This is the repository for the Djinni-Clone-API project, which is a clone of the Djinni web service. This API implements a basic set of functionalities allowing users to interact with the platform.
Djinni-Clone-API is developed using Django, one of the most popular frameworks for building web applications in Python. This API provides features such as user registration, advertisement creation, user profile management, and other core functionalities.
To run this API, you'll need:
- Python 3.11
- Django
- Django REST Framework
- and other dependencies listed in the
requirements.txt
file
- Clone the repository to your local machine:
$ git clone https://github.com/MafanNam/Djinni-Clone-API.git
- Navigate to the project directory:
$ cd Djinni-Clone-API
- Create/Activate environment:
$ pip install virtualenv
$ python -m virtualenv venv
$ .\venv\Scripts\activate
$ # or linux
$ source venv/bin/activate
- Install dependencies:
$ pip install -r requirements.txt
- Navigate to api directory:
$ cd backend
- Apply migrations to create the database:
$ python manage.py migrate
- Load example data
$ python -Xutf8 ./manage.py loaddata mydata.json
- Run the server:
$ python manage.py runserver
All user email in mydata.json and password=Pass12345
for admin user email=admin@gmail.com
and password=1
Then you MUST create and config django.env
optional django.docker.env
.
For example I create django.example.env
and django.docker.example.env
All these files are in .envs/.local/
You can now access the API in your browser at http://localhost:8000/.
Commands can be run through a makefile or written manually.
You can access the API in your browser at http://localhost:8080/. Flower http://localhost:5555/
You cannot use makefile
$ docker compose -f local.yml up --build -d --remove-orphans
$ # or
$ docker compose -f local.yml up --build
You can use makefile
$ make build
$ # or
$ make build-log
$ make buld-log
$ make up
$ make down
For testing
$ make tests
$ docker compose -f local.yml run --rm server python manage.py test
The API documentation is not available localhost:8080.
This project is developed by Mafan.
This project is licensed under MIT License.