Skip to content

koachcode/Shopping-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Development and Documentation Collaboration Project

Shopping List App

This app is to enable creating and managing shopping lists. The app is developed using Django Rest Framework (DRF).

Features

  1. User Registration - User should be able to register with the follwing details:
  • First name
  • Last name
  • Email
  • Password
  1. User login: User can log in with:

    • Email
    • Password
  2. Email verification: users receives email notification to confirm registered email.

  3. User can perform CRUD operation on the shopping list belonging to them.

Starting

Prerequisite
  • Note: You need to have python3.x installed on you machine.
Steps
  1. Clone the project into your machine.

          git clone https://github.com/Ginohmk/Shopping-list.git
  2. Navigate into the project folder.

       cd Shopping-list
  3. Start your virtual environment (mac/linux and windows)

      source/bin/activate

    Or for windows

      \venv\Scripts\activate.bat
  4. Install project dependencies.

      pip install -r requirements.txt
  5. Start server

      ./manage.py runserver
    

Folder Structure

This are the folders and files relevant to this project.

├── shopping_list # Project file
 ├── settings.py
 ├── urls.py
├── shop # Shopping_list app <br>
 ├── admin.py
 ├── models.py
 ├── serializers.py
 ├── services.py
 ├── urls.py
 ├── views.py
├── user # User app
 ├── admin.py
 ├── user_authentications.py # Custom authentication
 ├── models.py
 ├── user_permissions.py # Custom permision
 ├── serializers.py
 ├── services.py
 ├── urls.py
 ├── views.py
├── manage.py
├── README.md
├── requirements.txt

Backend APIs ( Live https://kanumikec.pythonanywhere.com/ )

User Apis
  1. Registration /api/users/register/ (Post)

    • Payload
    {
      "id": "string",
      "first_name": "string",
      "last_name": "string",
      "email ": "string",
      "password": "string"
    }
    • Response 200
    {
      "id": "string",
      "first_name": "string",
      "last_name": "string",
      "email ": "string"
    }

  2. Login /api/users/login/ (Post)

    • Payload
    {
      "email": "string",
      "password": "string"
    }
    • Response 200
  3. Logout /api/users/logout/ (Post)

    • Payload None

    • Response 200

    {
      "message": "Logged out Successfully"
    }

  4. Me /api/users/me/ (Get)

    • Payload None

    • Response 200

    {
      "id": "string",
      "first_name": "string",
      "last_name": "string",
      "email ": "string"
    }

  1. Email verification /api/user/verify-email/ (Post)

Note: Verification link is sent to user and when clicked they can verify their email

  • Payload None

  • Response 200


Shopping_list Apis
  1. Create shop /api/shops/ (Post)
  • Payload
{
 "description": "string",
 "priority": int,
 "title": "string",
 "due_date": "string datetime",
 "quantity": int,
 "is_complete": boolean
}
  • Response 200
{
 "id": "uuid string",
 "description": "string",
 "priority": int,
 "title": "string",
 "due_date": "string datetime",
 "quantity": int,
 "is_complete": boolean
 "user": {
   "id": "string",
   "first_name": "string",
   "last_name": "string",
   "email": "string"
 }
}

  1. Get All shop /api/shops/ (Get)

    • Response 200
     [
       {
         "id": "uuid string",
         "description": "string",
         "priority": int,
         "title": "string",
         "due_date": "string datetime",
         "quantity": int,
         "is_complete": boolean
         "user": {
           "id": "string",
           "first_name": "string",
           "last_name": "string",
           "email": "string"
         }
       }
     ]

  2. Delete shop /api/shops/<id: str>/ (Delete)

    • Response 204
  3. Update shop /api/shops/<id: str>/ (Put)

  • Payload

    {
    "description": "string",
    "priority": int,
    "title": "string",
    "due_date": "string datetime",
    "quantity": int,
    "is_complete": boolean
    }
  • Response 200

   {
     "id": "uuid string",
     "description": "string",
     "priority": int,
     "title": "string",
     "due_date": "string datetime",
     "quantity": int,
     "is_complete": boolean
     "user": {
       "id": "string",
       "first_name": "string",
       "last_name": "string",
       "email": "string"
     }
   }
  1. Retreive sinfle shop /api/shops/<id: str>/ (Get)
  • Response 200
   {
     "id": "uuid string",
     "description": "string",
     "priority": int,
     "title": "string",
     "due_date": "string datetime",
     "quantity": int,
     "is_complete": boolean
     "user": {
       "id": "string",
       "first_name": "string",
       "last_name": "string",
       "email": "string"
     }
   }

### Author

👤 Kanu Mike

👤 Evan Guma

🤝 Contribute

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page

Acknowledgement

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.

About

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors