A full-stack application that uses AI to automatically generate flashcards from your documents. Upload a PDF, DOCX, or TXT file and let Google Gemini create study materials for you.
Built with React, Django, and modern web technologies to demonstrate real-world full-stack development.
- Upload and process documents (PDF, DOCX, TXT)
- AI-powered flashcard generation
- User authentication
- Organize by topics
- Interactive flashcard viewer
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β Dining Area β ββββββ β Kitchen β ββββββ β Pantry β
β (Frontend) β β (Backend) β β (Database) β
β β β β β β
β React β β Django β β SQLite β
β What you see β β The logic β β Stored data β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
Frontend: What users see and interact with (the dining area) Backend: Where the logic happens (the kitchen) Database: Where data is stored permanently (the pantry) API: How they talk to each other (the order system)
When you upload a document, here's what happens:
1. User Action (Frontend)
You click "Create Flashcards" β React captures the event
The UI responds to your click using event handling.
2. The Request (API Call)
Browser sends HTTP POST β Travels to backend
An HTTP request with your file is sent to an endpoint like /api/flashcards/
3. Backend Receives (Routing)
Django receives request β Routes to the correct view
The server matches the URL and directs it to the right handler.
4. Processing (Database + AI)
View validates β Saves to database β Processes with AI
Django's ORM saves your data, then Gemini AI generates flashcards.
5. Response Sent Back
Backend sends JSON response β Status code indicates success
The server responds with a status code (like 201 Created) and data.
6. UI Updates
Frontend receives response β Updates the page
React's state management triggers a re-render to show your new flashcards.
π See ARCHITECTURE.md for detailed diagrams and code references
- React 18 - UI components
- Vite - Fast build tool
- Tailwind CSS - Styling
- Axios - API requests
- Django 5.2.7 - Web framework
- Django REST Framework - API toolkit
- JWT - Authentication
- SQLite - Database (built-in, no installation needed)
- Google Gemini - AI processing
- Python 3.8+
- Node.js 16+
- Git
New to installation? Check INSTALLATION.md for easy setup using package managers (Homebrew for macOS, Winget for Windows).
Run the setup script for your operating system:
macOS/Linux:
./setup.sh
Windows:
setup.bat
The script will:
- Check that Python and Node.js are installed
- Create your
.env
file from.env.example
- Install all dependencies
- Set up the database
- Guide you through any required steps
Then start the app:
make dev
Visit http://localhost:5173 to use the app!
1. Clone and configure
git clone <repository-url>
cd Help2Study
cp .env.example .env
# Edit .env and add your Gemini API key
2. Install dependencies
make install
# OR manually: pip install + npm install
3. Run migrations and start
make migrate
make dev
help2study/
βββ backend/ # Django (Server)
β βββ api/
β β βββ models.py # Database structure
β β βββ views.py # Request handlers
β β βββ serializers.py # Data conversion
β β βββ urls.py # API routing
β β βββ geminiapi.py # AI integration
β β βββ utils/ # Utility functions
β β βββ text_extractors.py
β βββ backend/
β βββ settings.py # Configuration
β
βββ frontend/ # React (Client)
β βββ src/
β βββ components/ # UI components
β βββ pages/ # Page views
β βββ services/ # API service layer
β β βββ topicService.js
β β βββ flashcardService.js
β βββ api.js # HTTP client
β
βββ ARCHITECTURE.md # System design details
βββ ADVANCED_PATTERNS.md # Professional patterns guide
βββ CONCEPTS_GUIDE.md # Technical glossary
βββ INSTALLATION.md # Beginner installation guide
βββ README.md # This file
REST API following standard HTTP methods:
Authentication
POST /api/user/register/
- Create accountPOST /api/token/
- Login
Flashcards (CRUD)
GET /api/topics/
- List topicsPOST /api/topics/
- Create topic + upload file to generate flashcardsGET /api/flashcards/<topic_id>/
- Get flashcards for a topicDELETE /api/topic/delete/<id>
- Delete topic
Use Help2Study as a starting point for your own ideas:
Replace the AI logic β Change geminiapi.py
to your own processing
Modify the data model β Edit models.py
for different data
Update the UI β Customize components with Tailwind
Add features β Search, real-time updates, exports, etc.
make install # Install all dependencies
make migrate # Setup database
make dev # Start both servers
make dev-backend # Start Django only
make dev-frontend # Start React only
make lint # Check code quality
make clean # Clean temp files
Windows users without Make: Use these commands instead:
# Start backend
cd backend && python manage.py runserver
# Start frontend (in a new terminal)
cd frontend && npm run dev
Full-Stack Development: Building frontend, backend, and database together Client-Server Model: Browser (client) requests data from server Request/Response Cycle: How clients and servers communicate HTTP Methods: GET (read), POST (create), DELETE (remove) ORM: Work with database using Python objects, not SQL State Management: How React tracks and updates data Environment Variables: Store secrets like API keys safely
π Full glossary with links: CONCEPTS_GUIDE.md
This Project:
- INSTALLATION.md - Fast setup using package managers
- ARCHITECTURE.md - Request flow diagrams
- CONCEPTS_GUIDE.md - Technical terms explained
- ADVANCED_PATTERNS.md - Professional patterns & refactoring guide
Official Docs:
- React - Frontend
- Django - Backend
- Django REST Framework - API
- Tailwind CSS - Styling
Learning:
- MDN Web Docs - Web fundamentals
- freeCodeCamp - Free tutorials
Can't find API_KEY
β Create .env
file with your Gemini API key
Can't connect to backend
β Make sure Django is running: make dev-backend
Database errors
β Run migrations: make migrate
Port already in use
β Kill process: lsof -ti:8000 | xargs kill -9
Think in systems: Plan your data model and API endpoints first Follow the request: Use browser DevTools to trace data flow Build incrementally: Start simple, add features one at a time
- Never commit
.env
or API keys - Change Django
SECRET_KEY
for production - Set
DEBUG=False
in production - Use PostgreSQL instead of SQLite in production
Built with Django, React, Vite, shadcn/ui, and Google Gemini