A professional REST API built with Django REST Framework for managing academic and professional events, paper submissions, and user registrations.
- Features
- Tech Stack
- Getting Started
- API Documentation
- API Endpoints
- Authentication
- Project Structure
- Testing
- Contributing
- π Token-based authentication
- π€ User registration and profile management
- π Role-based access control (Participant, Author, Admin)
- π Create and manage events with full CRUD operations
- π Event details including location, dates, and descriptions
- π·οΈ Topic-based categorization and filtering
- π Event schedules with day-by-day activities
- β Event registration for participants
- π Submit papers with PDF uploads
- π Paper status tracking (Submitted, Accepted, Rejected)
- π·οΈ Paper types: Oral, Poster, Workshop
- π¨βπΌ Admin review and status management
- π§ Contact form submissions
- π¬ Message management
| Technology | Purpose |
|---|---|
| Django 3.2 | Web Framework |
| Django REST Framework | API Development |
| PostgreSQL 13 | Database |
| Docker & Docker Compose | Containerization |
| drf-spectacular | API Documentation (OpenAPI 3.0) |
| Token Authentication | Security |
- Docker & Docker Compose installed
- Git
-
Clone the repository
git clone <repository-url> cd Event_api_app
-
Start the application with Docker
docker-compose up --build
-
Access the application
- API: http://localhost:8000/api/
- API Documentation: http://localhost:8000/api/docs/
- Admin Panel: http://localhost:8000/admin/
docker-compose run --rm app sh -c "python manage.py createsuperuser"Access the interactive API documentation at:
http://localhost:8000/api/docs/
Download the OpenAPI 3.0 schema at:
http://localhost:8000/api/schema/
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/user/create/ |
Register new user |
POST |
/api/user/token/ |
Get authentication token |
GET/PUT |
/api/user/me/ |
Manage current user profile |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/event/events/ |
List all events |
POST |
/api/event/events/ |
Create new event (Admin) |
GET |
/api/event/events/{id}/ |
Get event details |
PUT/PATCH |
/api/event/events/{id}/ |
Update event (Admin) |
DELETE |
/api/event/events/{id}/ |
Delete event (Admin) |
POST |
/api/event/events/{id}/register/ |
Register for event |
DELETE |
/api/event/events/{id}/cancel_registration/ |
Cancel registration |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/event/topics/ |
List all topics |
POST |
/api/event/topics/ |
Create topic (Admin) |
PUT/PATCH |
/api/event/topics/{id}/ |
Update topic (Admin) |
DELETE |
/api/event/topics/{id}/ |
Delete topic (Admin) |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/paper/{event_id}/papers/ |
List papers for event |
POST |
/api/paper/{event_id}/papers/ |
Submit paper (Author) |
GET |
/api/paper/{event_id}/papers/{id}/ |
Get paper details |
PATCH |
/api/paper/{event_id}/papers/{id}/set-status/ |
Set paper status (Admin) |
POST |
/api/paper/{event_id}/papers/{id}/upload-pdf/ |
Upload PDF (Admin) |
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/contact_us/ |
Submit contact message |
GET |
/api/contact_us/ |
List messages (Admin) |
This API uses Token Authentication.
curl -X POST http://localhost:8000/api/user/token/ \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password123"}'Include the token in your request headers:
curl -X GET http://localhost:8000/api/user/me/ \
-H "Authorization: Token your-token-here"| Role | Permissions |
|---|---|
| Participant | Register for events, view content |
| Author | Submit papers, all participant permissions |
| Admin | Full access to all resources |
Event_api_app/
βββ app/
β βββ app/ # Django project settings
β β βββ settings.py
β β βββ urls.py
β βββ core/ # Core models and admin
β β βββ models.py # User, Event, Paper, Topic models
β β βββ admin.py
β βββ user/ # User authentication API
β βββ event/ # Event management API
β βββ paper/ # Paper submission API
β βββ contact_us/ # Contact form API
βββ docs/ # Additional documentation
βββ docker-compose.yml
βββ Dockerfile
βββ requirements.txt
βββ README.md
Run tests using Docker:
# Run all tests
docker-compose run --rm app sh -c "python manage.py test"
# Run specific app tests
docker-compose run --rm app sh -c "python manage.py test user"
docker-compose run --rm app sh -c "python manage.py test event"
# Run with coverage
docker-compose run --rm app sh -c "coverage run manage.py test && coverage report"docker-compose run --rm app sh -c "flake8"# Create migrations
docker-compose run --rm app sh -c "python manage.py makemigrations"
# Apply migrations
docker-compose run --rm app sh -c "python manage.py migrate"For production deployment, ensure you:
- Set
DEBUG = Falsein settings - Configure proper
ALLOWED_HOSTS - Use environment variables for sensitive data
- Set up proper database credentials
- Configure static files serving
- Use HTTPS
This project is licensed under the MIT License.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
Made with β€οΈ using Django REST Framework