RevoU-FSSE-2 / week-22-RPrasetyoB

week-22-RPrasetyoB created by GitHub Classroom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Milestone 4 Project

FullStack Project Todo APP

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.

Technology

  • Flask Python

  • React Typescript

  • Postman

Getting Started

Installation

  • 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
    

API Documentation

 

API End Point

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

Users for test

  • admin
{
"username":"rpb"
"password":"rpb123"
}
  • user
{
"username":"rpb2"
"password":"rpb123"
}

Website design

Screenshot_19

Security Headers

  • BE :

    Screenshot_18

  • FE :

    Screenshot_17

Deployment

About

week-22-RPrasetyoB created by GitHub Classroom


Languages

Language:TypeScript 67.2%Language:Python 21.3%Language:HTML 10.2%Language:JavaScript 0.7%Language:Dockerfile 0.6%Language:CSS 0.0%