git clone https://github.com/Daily-Projects-Server/virtual-marketplace.git
cd virtual-marketplace/backend
python -m venv <VENV_NAME>
if you are on Linux you can activate it with
source venv/bin/activate
pip install -r requirements.txt
To access the secrets, create an .env file in the backend directory
A SECRET_KEY is mandatory for Django's security features. You can generate one by:
- Running this Python command:
python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
- Or by typing a long, random string of letters, numbers, and symbols.
Add the generated key to your .env
file:
SECRET_KEY="your_generated_secret_key_here"
By default, django is setup with sqlite3
. For this project, set DATABASE_URL
in your .env
to set the database
DATABASE_URL="sqlite:////Path\To\Your\Project\db.sqlite3"
Note that four /
after sqlite:
are mandatory
For windows users -> \\
after each folder is required
DATABASE_URL="postgres://username:password@HOSTNAME:PORT/DATABASE_NAME
Examples are given in .env.sample
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
Navigate to http://127.0.0.1:8000
- Install pre-commit hooks
pre-commit install
- Run pre-commit checks
pre-commit run
The API documentation for this project is available using two different interfaces. You can access them when the server is running:
-
Swagger UI: Navigate to http://127.0.0.1:8000/api/swagger/ This provides an interactive interface where you can explore and test the API endpoints.
-
ReDoc: For a more user-friendly, easy-to-read documentation, visit http://127.0.0.1:8000/api/redoc/
These documentation pages offer:
- A comprehensive list of all available API endpoints
- Detailed information about request/response formats
- The ability to try out API calls directly from the browser (Swagger UI)
- Authentication requirements for protected endpoints
- A clear, organized view of the API structure (ReDoc)
This project was generated with Angular CLI version 18.1.0.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.