Skip to content

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.

License

Notifications You must be signed in to change notification settings

MafanNam/Djinni-Clone-API

Repository files navigation

Djinni-Clone-API

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 title

Diagram DB

Djinni diagram DB

Description

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.

Djinni frontend

Requirements

To run this API, you'll need:

  • Python 3.11
  • Django
  • Django REST Framework
  • and other dependencies listed in the requirements.txt file

Installation and Running

  1. Clone the repository to your local machine:
$ git clone https://github.com/MafanNam/Djinni-Clone-API.git
  1. Navigate to the project directory:
$ cd Djinni-Clone-API
  1. Create/Activate environment:
$ pip install virtualenv
$ python -m virtualenv venv
$ .\venv\Scripts\activate
$ # or linux
$ source venv/bin/activate
  1. Install dependencies:
$ pip install -r requirements.txt
  1. Navigate to api directory:
$ cd backend
  1. Apply migrations to create the database:
$ python manage.py migrate
  1. Load example data
$ python -Xutf8 ./manage.py loaddata mydata.json
  1. Run the server:
$ python manage.py runserver

About fixtures(mydata.json)

All user email in mydata.json and password=Pass12345

for admin user email=admin@gmail.com and password=1

If you want the api to send messages to mail

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/.

Getting Started with Docker

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/

To build and raise a container, you just need to run it:

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

Basic commands:

$ make buld-log

$ make up

$ make down

Run test

For testing

makefile

$ make tests

no makefile

$ docker compose -f local.yml run --rm server python manage.py test

API Documentation

The API documentation is not available localhost:8080.

Djinni endpoints

Author

This project is developed by Mafan.

License

This project is licensed under MIT License.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages