An ERP for Manpower Supply Agency to Manage Agent, Passengers, Accounts, Company Cost, Company Documents and Tracking Passenger Status.
- Technology Used
- Features
- Advanced Features
- Advanced Configuration
- Running Locally using Git
- Running Locally using Docker
- Configuration
- SetUp Environment Variables
- Frontend: HTML5, CSS3, Bootstrap5
- Backend: Python=3.11.10, Django=5.1.1
- Database: PostgreSQL
- Version Control: Git, GitHub, GitLab
- Containerization: Docker
- Background Task Manage: Redis, Celery, Supervisor
- Editor: VS Code
- Operating System: Ubuntu 24.04 LTS
- Browser(Tested On): Google Chrome, Microsoft Edge, Mozilla Firefox
- Dashboard: Display the summary of the application.
- Agent Management: Add, Update, Delete, List, Search, Filter, Export Agents.
- Passenger Management: Add, Update, Delete, List, Search, Filter, Export Passengers.
- Company Cost Management: Add, Update, Delete, List, Search, Filter, Export Company Cost.
- Company Document Management: Add, Update, Delete, List, Search, Filter, Export Company Documents.
- Passenger Status Management: Add, Update, Delete, List, Search, Filter, Export Passenger Status.
- Notification: Send notification before document expiry date.
- User Management: Add, Update, Delete, List, Search, Filter, Export Users.
- Group/Role Management: Add, Update, Delete, List Roles.
- Permission Management: Add, Update, Delete Permissions.
- Use Django's Decorators to restrict access to views based on user roles and permissions.
- Use Django's Context Processor to add custom Notification context to all templates.
- Build custom UserManager and Permissions to manage user roles/groups and permissions.
- Use PostgreSQL for database. Use railway for hosting cloud database.
- Use celery for background task management. To create notification before document expiry date.
- Use AWS S3 for storing static and media files.
- Use Cloudflare for CDN.
- Use Docker for containerization.
- Use
supervisorfor managing celery worker and beat. - Use Docker to run the application and deploy it in the railway.app to host the application.
-
Clone the repository:
git clone https://github.com/musfiqdehan/OnlineLearningPlatform.git cd your-project -
Create a virtual environment:
python -m venv .venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run database migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
Now visit http://127.0.0.1:8000/ in your web browser to see the application in action.
- Pull the Docker Image
docker pull musfiqdehan/manpower-supply-agency-erp:latest- Run using Docker
docker run -p 8080:8080 musfiqdehan/manpower-supply-agency-erp:latest
- Run using Docker Compose
docker-compose up --buildThere is separate settings for production and development server. Below is the folder structure of my project folder
.
├── asgi.py
├── celery.py
├── __init__.py
├── mysitemap.py
├── settings
│ ├── base.py
│ ├── development.py
│ ├── __init__.py
│ └── production.py
├── urls.py
└── wsgi.py
-
Create a
.envfile in the root of the project folder and add the following environment variables -
See the
.env.examplefile for reference
SECRET_KEY=
DJANGO_SETTINGS_MODULE=
# AWS S3 settings for production
AWS_STORAGE_BUCKET_NAME=
AWS_LOCATION=
AWS_S3_ACCESS_KEY_ID=
AWS_S3_SECRET_ACCESS_KEY=
AWS_S3_CUSTOM_DOMAIN=
AWS_S3_ENDPOINT_URL=
AWS_S3_FILE_OVERWRITE=
# Database settings for production
DB_NAME=
DB_USER=
DB_PASSWORD=
DB_HOST=
DB_PORT=
# Celery settings for production
CELERY_BROKER_URL=
CELERY_RESULT_BACKEND=