Skip to content

This is a pharmacy marketplace where users can buy and sell drugs. The application is built using Django and Django Rest Framework.

License

Notifications You must be signed in to change notification settings

Diyarbekoralbaev/pharmacy_marketplce

Repository files navigation

Pharmacy Marketplace

Description

This is a pharmacy marketplace where users can buy and sell drugs. The application is built using Django and Django Rest Framework.

Features

  • Users can register and login in 3 roles: admin, seller, buyer
  • Admin can add, update, delete drugs
  • Seller can add, update, delete drugs
  • Buyer can view drugs and buy drugs
  • Buyer can view order history
  • Buyer can view order details
  • Buyer can cancel order

Technologies

  • Django
  • Django Rest Framework
  • Docker
  • Docker Compose
  • Django Rest Framework Simple JWT
  • drf-yasg
  • Redis
  • Django Cors Headers

Installation

  1. Clone the repository
git clone https://github.com//Diyarbekoralbaev/Pharmacy-Marketplace.git
  1. Change directory
cd Pharmacy-Marketplace
  1. Run the application
docker-compose up --build
  1. Create superuser
docker-compose exec web python manage.py createsuperuser
  1. Access the application at http://localhost:8000
  2. Access the admin panel at http://localhost:8000/admin
  3. Access the Swagger documentation at http://localhost:8000/swagger
  4. Access the Redoc documentation at http://localhost:8000/redoc

API Endpoints

Users

  • GET /users/ - Get all users
  • POST /users/signup/ - Register user
  • POST /users/login/ - Login user
  • GET /users/me/ - Get current user
  • PUT /users/me/ - Update current user
  • POST /users/change-password/ - Change password (current user)
  • POST /users/forgot-password/ - Forgot password (send email)
  • POST /users/reset-password/ - Reset password (via otp code sent to email)
  • GET /users/{id}/ - Get user by id
  • PUT /users/{id}/ - Update user by id
  • DELETE /users/{id}/ - Delete user by id

Drugs

  • GET /drugs/ - Get all drugs
  • POST /drugs/create/ - Create drug
  • GET /drugs/{id}/ - Get drug by id
  • PUT /drugs/update/{id}/ - Update drug by id
  • DELETE /drugs/delete/{id}/ - Delete drug by id
  • GET /drugs/categories/ - Get all drug categories
  • GET /drugs/my_drugs/ - Get all drugs created by current user

Orders

  • GET /users/orders/ - Get all orders created by current user
  • POST /users/orders/ - Create order
  • GET /users/orders/{id}/ - Get order by id
  • PUT /users/orders/{id}/ - Update order by id
  • DELETE /users/orders/{id}/ - Delete order by id
  • POST /users/orders/items/ - Delete item from order

License

This project is open-sourced software licensed under the MIT license.

Author

Acknowledgements

Contributing

Contributions are welcome! Fork the repository and create a pull request to contribute.

Support

For support, contact me from the links provided above.

Thank you for using Pharmacy Marketplace!

About

This is a pharmacy marketplace where users can buy and sell drugs. The application is built using Django and Django Rest Framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages