This is the backend part of the SciCommons project, built with Django. It handles all the server-side logic, database interactions, and API endpoints for the application.
- Framework: Django
- Database: PostgreSQL (or any other database of your choice)
- API: Django REST Framework
- MediaStorage AWS s3
- Python 3.8 or higher
- pip (Python package installer)
- Virtual environment (optional but recommended)
Make a .env file with following variables:
EMAIL_HOST_USER =
EMAIL_HOST_PASSWORD =
EMAIL_PORT =
EMAIL_USE_TLS =
DEFAULT_FROM_EMAIL =
AWS_ACCESS_KEY_ID =
AWS_SECRET_ACCESS_KEY =
AWS_STORAGE_BUCKET_NAME =
AWS_S3_SIGNATURE_NAME =
AWS_S3_REGION_NAME =
AWS_S3_FILE_OVERWRITE =
AWS_DEFAULT_ACL =
AWS_S3_VERITY =
DEFAULT_FILE_STORAGE =
DBNAME =
DBUSER =
DBPASSWORD =
DBHOST =
DBPORT =
DATABASE_URL =
- Use DATABASE_URL, or default database based on your database connections.
- Add aws s3 bucket configuration for media file storage.
- Generate App Password for mail to use it for mail services.
-
Clone the repository:
git clone https://github.com/m2b3/SciCommons-backend cd SciCommons-backend
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
- Apply the migrations:
python manage.py migrate
- Create a superuser:
python manage.py createsuperuser
- Run the development server:
python manage.py runserver
The backend server should now be running on http://localhost:8000.
You can access the API documentation and interact with the available endpoints by visiting http://localhost:8000/docs when the development server is running. You can see the documentation in swagger.
Contributions are always welcome! Please read the contribution guidelines first.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or want to reach out to the team, please create an issue on GitHub.
Made with ❤️ by the SciCommons team