UNIHACK Hackathon Project - A personalized study assistant that generates customized study plans based on your understanding.
This repository is organized as a monorepo with Git submodules:
- agent_backend: Core backend services for the CramPlan platform
- cramplan_frontend: Frontend application (submodule)
- cramplan_voice: Voice interaction component (submodule)
To clone the repository with all submodules:
git clone --recurse-submodules https://github.com/yourusername/cramplan.git
# or if already cloned:
git submodule update --init --recursive- Topic Generation: Generate study topics based on a subject
- Quiz Generation: Create quizzes to test your understanding
- Understanding Evaluation: Evaluate your understanding based on quiz responses
- Content Generation: Generate detailed study content based on your understanding
- PDF Generation: Export your study materials as beautifully formatted PDFs
- Voice Interaction: Interact with the platform using voice commands (in development)
The project is divided into three main components:
The backend is built with FastAPI and provides the core functionality of the application:
- Topic generation using AI
- Quiz creation and evaluation
- Content generation based on understanding
- PDF generation and export
Key files:
api.py: Main API endpointsllm_main.py: AI agents for different taskspdf_generator.py: PDF generation utilitiesenv_setup.py: Environment setup utilities
The frontend is built with Next.js and provides a user-friendly interface for interacting with the application:
- Home page for subject input
- Assessment page for quiz taking
- Study plan page for viewing generated content
- Upload page for importing existing materials
Key directories:
app/: Main application pagescomponents/: Reusable UI componentsstyles/: CSS and stylinglib/: Utility functions and API clients
The voice component is a separate module that enables voice interaction with the platform (currently in development):
- Voice command recognition
- Voice response generation
- Integration with the main application
The backend provides the following API endpoints:
/generate-topics: Generate study topics based on a subject/generate-quiz: Generate a quiz based on topics/evaluate-quiz: Evaluate understanding based on quiz responses/curate-topics: Curate topics based on understanding/generate-content: Generate detailed study content/complete-flow: Run the complete flow from topic generation to content generation/generate-pdf-from-content: Generate a PDF from content/generate-pdf-from-file: Generate a PDF from a markdown file/generate-pdf-from-text: Generate a PDF from markdown text/complete-flow-with-pdf: Run the complete flow and return the result as a PDF/health: Health check endpoint
CramPlan supports exporting your study materials as PDF documents. This feature allows you to:
- Generate PDFs from content generated by the application
- Convert markdown files to PDFs
- Convert markdown text to PDFs
- Run a complete flow and get the result as a PDF
For detailed instructions on setting up and using the PDF generation functionality, see PDF Generation Documentation.
- Clone the repository with submodules:
git clone --recurse-submodules https://github.com/yourusername/cramplan.git
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env # Edit .env with your API keys - Set up WeasyPrint for PDF generation (macOS):
brew install pango libffi cairo pango gdk-pixbuf libxml2 libxslt source agent_backend/setup_weasyprint.sh - Run the backend:
cd agent_backend uvicorn api:app --reload
- Navigate to the frontend directory:
cd cramplan_frontend - Install dependencies:
npm install # or pnpm install - Run the development server:
npm run dev # or pnpm dev - Open http://localhost:3000 in your browser
The voice component is currently in development. More details will be provided in future updates.
- FastAPI
- OpenAI
- WeasyPrint (for PDF generation)
- Markdown
- Python-dotenv
- Uvicorn
- Next.js
- React
- Tailwind CSS
- Shadcn UI
- TypeScript
MIT