This project is a robust RESTful API for managing a personal flashcard system. Built using Django and Django Rest Framework (DRF), it provides authenticated endpoints for users to create, organize, and manage flashcards and flashcard decks.
This backend serves as a powerful foundation for any external client application (e.g., a React, Vue, or mobile app) that requires spaced repetition learning tools.
- User Authentication: Secure registration and token-based login using the
authenticationmodule. - Deck Management (CRUD): Users can create, retrieve, update, and delete flashcard decks to categorize their study material.
- Flashcard Management (CRUD): Full CRUD operations for individual flashcards within a deck (front side/question and back side/answer).
- Data Organization: Structured models designed for efficient retrieval and learning progression.
- RESTful Design: Clean, intuitive, and standard API design principles for easy integration with frontend clients.
| Category | Technology | Purpose |
|---|---|---|
| Backend Framework | Django | Python web framework. |
| API Framework | Django Rest Framework (DRF) | Building powerful and secure REST APIs. |
| Language | Python | Primary development language (100%). |
| Authentication | JWT or Token-Based | Secure user access control. |
| Database | PostgreSQL / SQLite | Data persistence (default configuration). |
Follow these steps to set up the API server locally.
git clone [https://github.com/Denesepro/flashcard-drf.git](https://github.com/Denesepro/flashcard-drf.git)
cd flashcard-drf
### 2. Set up Virtual Environment & Dependencies
It is highly recommended to use a virtual environment.
```bash
# Create a virtual environment
python -m venv venv
# Activate the environment
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
# Install required packages (assuming a requirements.txt exists or similar DRF packages)
pip install django djangorestframework djangorestframework-simplejwt # Example packages
### 3. Database Setup
Apply migrations to initialize the database schema:
```bash
python manage.py makemigrations
python manage.py migrate
### 4. Create a Superuser (Optional)
Create an admin user to access the Django Admin panel:
```bash
python manage.py createsuperuser
### 5. Run the Server
Start the Django development server:
```bash
python manage.py runserver
The API will be accessible at http://127.0.0.1:8000/.