A comprehensive Django-based survey and assessment management system for creating hierarchical groups, categories, and subcategories to organize questions and collect responses.
This project is a powerful Django-based application for user management, survey, and assessment. It enables you to build hierarchical groups, categories, subcategories, organize questions, collect responses, and efficiently manage user access. It comes with custom authentication, flexible upload center, a modern dashboard, and robust CI/CD integration.
- Advanced Authentication
- Custom user model (supports both email and phone)
- Google OAuth login (django-allauth)
- Phone verification using Kavenegar SMS API
- User activation and multi-factor authentication
-
Upload Center
- Upload center for images and media files
- Secure storage and management of uploaded content
- Store images, documents, and other media
- Easy access to uploaded content in forms and responses
-
Hierarchical Organization
- Define groups with parentβchild relationships
- Organize content into categories and nested subcategories
- Adaptable structure for quizzes, polls, and assessments
-
Survey & Response Management
- Create multiple types of questions (checklist, multiple choice, etc.)
- Store and filter responses by user, group, category, subcategory
- Export responses for reporting and analytics
-
Dashboard Interface
- Intuitive UI for browsing hierarchy and managing content
- Dynamic forms for submitting survey responses
- Admin views for bulk operations and content moderation
-
Powerful API
- RESTful API built with Django REST Framework (DRF)
- Ready endpoints for groups, categories, questions, and responses
- Modular and clean codebase for easy extension
-
CI/CD & Deployment
- Fully automated deployment to Railway via GitHub Actions
- Automated testing and code quality checks on each push
| Layer | Tools & Libraries |
|---|---|
| Backend | Django 5.2.1, Python 3.x, PostgreSQL |
| Authentication | django-allauth, custom phone auth |
| Frontend | Django Templates, HTML5, CSS3, JavaScript |
| APIs | Django REST Framework, Google OAuth, Kavenegar SMS API |
| DevOps | Docker, Docker Compose, Railway, GitHub Actions |
-
Clone the repository
git clone https://github.com/ihoooman/demoproject.git cd survey-management-system -
Set up a virtual environment
python3 -m venv venv source venv/bin/activate -
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
-
Copy
.env.exampleto.envand update keys:DATABASE_URL=postgres://user:password@localhost:5432/database_name DEBUG=False KAVENEGAR_API_KEY=your_kavenegar_api_key_here KAVENEGAR_SENDER=your_kavenegar_sender_number_here SECRET_KEY=your_django_secret_key_here ALLOWED_HOSTS=localhost,127.0.0.1,your-domain.com GOOGLE_CLIENT_ID=your_google_client_id_here GOOGLE_CLIENT_SECRET=your_google_client_secret_here
-
-
Apply database migrations
python manage.py migrate
-
Create a superuser (optional)
python manage.py createsuperuser
-
Start the development server
python manage.py runserver
-
Visit
http://127.0.0.1:8000/in your browser.
You can also run this application using Docker, which simplifies the setup process and ensures consistency across different environments.
-
Build and run with Docker
# Build the Docker image docker build -t survey-management-system . # Run the container docker run -p 8000:8000 survey-management-system
-
Using Docker Compose (recommended)
# Start all services docker-compose up # Run in detached mode docker-compose up -d # Stop all services docker-compose down
-
Access the application
Visit
http://localhost:8000in your browser.
When using Docker, you can configure the application by setting environment variables in the docker-compose.yml file or by passing them to the docker run command:
docker run -p 8000:8000 \
-e DEBUG=False \
-e SECRET_KEY=your_secret_key \
-e ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com \
survey-management-system-
Create a project in the Google Cloud Console.
-
Enable Google+ API and generate OAuth credentials.
-
Add your application domain to Authorized domains.
-
Update
SOCIALACCOUNT_PROVIDERSinsettings.py:SOCIALACCOUNT_PROVIDERS = { 'google': { 'APP': { 'client_id': 'YOUR_CLIENT_ID', 'secret': 'YOUR_CLIENT_SECRET', } } }
-
Sign up at Kavenegar and obtain an API key.
-
Set
KAVENEGAR_API_KEYandKAVENEGAR_SENDERin.env:KAVENEGAR_API_KEY=your_api_key KAVENEGAR_SENDER=your_sender_number
This application is deployed on Railway with continuous deployment set up via GitHub Actions.
Live Demo:
https://demoproject-production-6b92.up.railway.app
The deployment workflow automatically triggers a rebuild on Render when changes are pushed to the main branch.
demoproject/
βββ LICENSE
βββ README.md
βββ requirements.txt
βββ .env.example
βββ manage.py
βββ project/
β βββ settings.py
β βββ urls.py
β βββ wsgi.py
βββ accounts/
β βββ models.py
β βββ views.py
β βββ tests.py
βββ dashboard/
β βββ models.py
β βββ views.py
β βββ forms.py
β βββ tests.py
β βββ templates/
β βββ dashboard/
βββ login/
β βββ utils.py
βββ screenshots/
β βββ demo.png
Contributions are welcome! Please:
- Fork the repo
- Create a branch:
git checkout -b feature/YourFeature - Commit:
git commit -m "Add YourFeature" - Push:
git push origin feature/YourFeature - Open a Pull Request
This project is licensed under the MIT License. See LICENSE for details.
- SHA:
20aeb115 - Author: Hooman Maddah (ihoooman)
- Date: 2025-06-11 11:01 UTC
- Message: Add djangorestframework version 3.16.0 to requirements.txt
Thank you for using and contributing! π
- GitHub: github.com/ihoooman
- LinkedIn: linkedin.com/in/hoomanmdd
Feel free to explore, review, or connect!

