https://github.com/mrbowis/todo
This is a microservice project that contains a ToDo list using Django and Django-RestFramework, includes a Login made with Django and Django-RestFramework, and a Client made with NextJs
https://github.com/mrbowis/todo
django django-rest-framework docker docker-compose nextjs
Last synced: 5 months ago
JSON representation
This is a microservice project that contains a ToDo list using Django and Django-RestFramework, includes a Login made with Django and Django-RestFramework, and a Client made with NextJs
- Host: GitHub
- URL: https://github.com/mrbowis/todo
- Owner: MrBowis
- Created: 2024-09-11T02:40:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-20T00:46:03.000Z (over 1 year ago)
- Last Synced: 2025-02-11T17:13:58.445Z (over 1 year ago)
- Topics: django, django-rest-framework, docker, docker-compose, nextjs
- Language: Python
- Homepage:
- Size: 538 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ToDoList-Django
This is a porject ToDo List application built with Django for the main microservice and login service, for the client use NextJS.
## Prerequisites
- Python 3.x
- pip (Python package installer)
- virtualenv
- Docker
- NodeJS
## Setup
### 1. Clone the Repository
```bash
git clone https://github.com/yourusername/ToDoList-Django.git
cd ToDo
```
### 2. Create and Activate Virtual Environment
You can use the following command to create a virtual environment:
```bash
python -m venv venv
```
Then you can activate the virtual environment using the following command:
Linux/Mac:
```bash
source venv/bin/activate
```
Windows:
```bash
venv\Scripts\activate
```
### 3. Start containers
```bash
docker compose up --build
```
- Visit `http://127.0.0.1:8000` in your browser to see the _**To Do**_ application.
- Visit `http://127.0.0.1:8002` in your browser to see the _**Login**_ application.
- Visit `http://127.0.0.1:3000` in your browser to see the _**Client**_ application.
## Explanation - To Do
This project is a simple CRUD application using Django. It allows you to create, read, update and delete records from a database. The application has a two models called `Task` and `Comments` with the following fields:
- Task
- Task
- Completed
- Group
- Created Date
- Updated Date
- Group
- Name
The application also has a REST API that allows you to perform CRUD operations on the tasks and Group of task. The API has the following endpoints:
- `/api/task/`
- GET: Get a list of all tasks
- POST: Create a new task
- `/api/task/{id}/`
- GET: Get the details of a specific task
- PUT: Update a specific task
- DELETE: Delete a specific task
- `/api/group/`
- GET: Get a list of all comments
- POST: Create a new comment
- `/api/group/{id}/`
- GET: Get the details of a specific comment
- PUT: Update a specific comment
- DELETE: Delete a specific comment
## Explanation - Login
There are three main routes for this microservice:
- `/login`
- POST: The body use the json bellow but `id` is optional and respose a token
```json
{
"id": "",
"username": "",
"email": "",
"password": ""
}
```
- `/register`
- POST: The body use the json bellow and respose a token
```json
{
"username": "",
"password": ""
}
```
- `/profile`
- GET: use Authentication parameter with token to obtain the data of any user who has registered
## License
This project is licensed under the MIT License.
## Author
[Alejandro Andrade](https://github.com/MrBowis)