What is FitCoreAI?
FitCoreAI is a modern, open, and flexible workflow that combines AI-driven fitness planning with instant, beautiful PDF generation— Users interact via a clean Streamlit web app, is automation using n8n, Django REST Framework, and pdfkit.
How Does It Work?
1. Streamlit Frontend
- Users fill in a simple form (name, age, gender, height, weight, goal, etc.).
- On submit, data is sent via a
requests
POST to your n8n webhook. - Example payload :
{
"name": "John",
"age": "28",
"gender": "male",
"height": "178",
"weight": "75",
"goal": "build muscle",
"diet": "high protein",
"level": "intermediate",
"days": "4"
}
The Streamlit UI is intuitive and visually appealing :
pdf sample :
2. n8n Workflow
- Webhook: Receives form data.
- AI Agent: Calls a language model to generate a tailored HTML fitness plan using strict formatting.
- HTTP Request: Posts the HTML & user data to your Django API (DRF endpoint), which generates a PDF using pdfkit.
- JS Code Node: Renames the binary file with user’s name for clarity.
- HTTP Request: Uploads the PDF to storage or another custom endpoint. ( mine i made with django API )
3. Django REST Framework Backend
- PDF Generation Endpoint: Accepts POSTed data, renders the HTML to PDF with pdfkit and returns it.
- Upload/Listing Endpoint: Stores metadata about each PDF, supports querying by specific ID and name, and uses DRF serializers.
- File Handling: PDF files are uploaded and stored using Django’s FileField with validators and security handling
4. Streamlit PDF Preview (Optional)
- You can extend the Streamlit app to preview or download the generated PDF directly.
n8n Workflow
Key Features
- Interactive Streamlit App frontend for user data collection.
- Flexible n8n Workflow: Orchestrates AI, PDF generation, and file handling.
- Django REST API: Handles PDF creation and storage.
- AI-powered HTML Plan Generation for consistent styling and easy PDF rendering.
- Modular: Easily extend for other document types (meal plans, business summaries, etc).
- Open-source: Swap endpoints, models, or storage as you need.
Contact & Collaboration
Feel free to reach out:
- Email: [email protected]
- LinkedIn: linkedin-profile
Extending the Project ( what i am adding now )
- Add user authentication (DRF supports this out of the box)
- Integrate email delivery of PDFs
- Extend the Streamlit app to preview/download PDFs after creation
- Use any LLM or PDF rendering service you prefer (just update endpoints)
Thanks for reading!
If you have ideas, suggestions, please contact or leave a comment
Let me know if you need anything else, more screenshots, or a video demo!