a2252fa92388c960cf21808b9b423275a4a7436a
- Remove old Confluence variables - Add NEXT_PUBLIC_API_URL for API access 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Filamenteka
A web application for tracking Bambu Lab filament inventory with automatic color coding, synced from Confluence documentation.
Features
- 🎨 Automatic Color Coding - Table rows are automatically colored based on filament colors
- 🔄 Confluence Sync - Pulls filament data from Confluence table every 5 minutes
- 🔍 Search & Filter - Quick search across all filament properties
- 📊 Sortable Columns - Click headers to sort by any column
- 🌈 Gradient Support - Special handling for gradient filaments like Cotton Candy Cloud
- 📱 Responsive Design - Works on desktop and mobile devices
Technology Stack
- Frontend: React + TypeScript + Tailwind CSS
- Backend: API routes for Confluence integration
- Infrastructure: AWS Amplify (Frankfurt region)
- IaC: Terraform
Prerequisites
- Node.js 18+ and npm
- AWS Account
- Terraform 1.0+
- GitHub account
- Confluence account with API access
Setup Instructions
1. Clone the Repository
git clone https://github.com/yourusername/filamenteka.git
cd filamenteka
2. Install Dependencies
npm install
3. Configure Confluence Access
Create a Confluence API token:
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Create a new API token
- Note your Confluence domain and the page ID containing your filament table
4. Deploy with Terraform
cd terraform
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your values
terraform init
terraform plan
terraform apply
5. Environment Variables
The following environment variables are needed:
CONFLUENCE_API_URL- Your Confluence instance URL (e.g., https://your-domain.atlassian.net)CONFLUENCE_TOKEN- Your Confluence API tokenCONFLUENCE_PAGE_ID- The ID of the Confluence page containing the filament table
Local Development
# Create .env file for local development
cat > .env << EOF
CONFLUENCE_API_URL=https://your-domain.atlassian.net
CONFLUENCE_TOKEN=your_api_token
CONFLUENCE_PAGE_ID=your_page_id
EOF
# Run development server
npm run dev
Visit http://localhost:5173 to see the app.
Table Format
Your Confluence table should have these columns:
- Brand - Manufacturer (e.g., BambuLab)
- Tip - Material type (e.g., PLA, PETG, ABS)
- Finish - Finish type (e.g., Basic, Matte, Silk)
- Boja - Color name (e.g., Mistletoe Green, Hot Pink)
- Refill - Whether it's a refill spool
- Vakum - Vacuum sealed status
- Otvoreno - Opened status
- Količina - Quantity
- Cena - Price
Color Mapping
The app includes mappings for common Bambu Lab colors:
- Basic colors: Red, Blue, Green, Yellow, etc.
- Special colors: Mistletoe Green, Indigo Purple, Hot Pink, etc.
- Gradient filaments: Cotton Candy Cloud
- Matte finishes: Scarlet Red, Marine Blue, etc.
Unknown colors default to light gray.
Deployment
Push to the main branch to trigger automatic deployment:
git add .
git commit -m "Update filament colors"
git push origin main
Amplify will automatically build and deploy your changes.
Adding New Colors
To add new color mappings, edit src/data/bambuLabColors.ts:
export const bambuLabColors: Record<string, ColorMapping> = {
// ... existing colors
'New Color Name': { hex: '#HEXCODE' },
};
Troubleshooting
Confluence Connection Issues
- Verify your API token is valid
- Check the page ID is correct
- Ensure your Confluence user has read access to the page
Color Not Showing
- Check if the color name in Confluence matches exactly
- Add the color mapping to
bambuLabColors.ts - Colors are case-insensitive but spelling must match
License
MIT
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Description
Languages
TypeScript
76.8%
JavaScript
11.4%
HCL
4.7%
Shell
3.7%
PLpgSQL
2.3%
Other
1.1%