This is a simple full-stack to-do list application built using Flask for the backend and React with TypeScript for the frontend. The app supports CRUD operations and implements Role-Based Access Control (RBAC) for user roles.
The backend (Flask) communicates with the frontend (React) through a RESTful API. The API defines endpoints for CRUD operations on tasks, allowing the frontend to interact seamlessly with the backend.
-
Flask Python
-
React Typescript
-
Postman
-
BE :
git clone https://github.com/RevoU-FSSE-2/week-22-RPrasetyoB cd functions pipenv install pipenv shell flask run
-
FE :
git clone https://github.com/RevoU-FSSE-2/week-22-RPrasetyoB cd hosting npm install npm run dev
Endpoint | Req body | Access Token | Authorization | |
---|---|---|---|---|
Login | POST /auth/login |
username, password | - | - |
Register | POST /auth/register |
username (unique), password, role (if role empty auto set to 'user') | - | - |
Get todolist | GET /todo |
- | required | by role: admin will get all todo, user only get todo that he made |
Add new todo | POST /todo |
todo, priority (status auto set to "in progress" & due_date auto set to 3 days ahead) |
required | - |
Update todo | PUT /todo/:id |
todo, status, due_date | required | by username / maker |
Delete todo | DEL /todo/:id |
required | by username / maker |
- admin
{
"username":"rpb"
"password":"rpb123"
}
- user
{
"username":"rpb2"
"password":"rpb123"
}