Shomonnoy-Backend is a smart scheduling and coordination platform that helps city authorities manage and streamline road digging and construction works by multiple stakeholders without conflicts.
- Miniconda or Anaconda installed
- Python 3.11 (recommended)
- PostgreSQL installed
- PostgreSQL superuser access (to enable PostGIS)
git clone <repo-url>
cd Shomonnoy-Backend
conda create -n shomonnoy python=3.11
conda activate shomonnoy
conda install -c conda-forge django djangorestframework psycopg2 gdal python-decouple whitenoise
pip install djangorestframework_simplejwt PyJWT sqlparse tzdata
- Open
psql
or PgAdmin as a superuser (e.g.,postgres
). - Create a database and user:
CREATE DATABASE shomonnoydb; CREATE USER superadmin WITH PASSWORD 'yourpassword'; GRANT ALL PRIVILEGES ON DATABASE shomonnoydb TO superadmin;
- Enable PostGIS extension (run as superuser on the database):
\c shomonnoydb CREATE EXTENSION postgis;
- Create a
.env
file in the project root (if usingpython-decouple
).DB_NAME=shomonnoydb DB_USER=superadmin DB_PASSWORD=yourpassword DB_HOST=localhost DB_PORT=5432
- Update
settings.py
to read from.env
and use:'ENGINE': 'django.contrib.gis.db.backends.postgis',
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
Visit http://127.0.0.1:8000/admin/
to log in.
- Pull latest changes:
git pull
- Create a new branch:
git checkout -b feature-branch
- Make changes and commit:
git add . && git commit -m "Your message"
- Push your branch:
git push origin feature-branch
- Open a pull request for review.
- Never commit secrets or
.env
files. - Use migrations for all model changes.
- Communicate via repo issues and pull requests.
- If you encounter issues with GDAL or psycopg2, always install them via conda.