---
# System prepended metadata

title: Graduation Project

---

# Graduation Project
[App Design](https://www.behance.net/gallery/141008337/Todopus-Not-Just-a-Project-Management-App?tracking_source=search_projects%7Cproject%20management%20web%20app)

# Question:

## get specific project

GET/project/:id | get single project | yes | checkAuth | params.id | { data: {id, name,  description, admin, members, sections}, message } & status(204) | server error? 500 

----

Routes
- [ ] signin
- [x] signup
- [x] getProjects
- [ ] addProject
- [ ] editProject
- [ ] deleteProject
- [ ] getproject/:id
- [ ] Get Sections Route
- [ ] Add Section Route
- [ ] Edit Section Route
- [ ] Delete Section Route
- [x] Get Tasks Route
- [ ] Add Task Route
- [ ] Edit Task Route
- [ ] Delete Task Route


----

## User Story:
1. As a user I can:
- [ ] Browse the landing page.
- [ ] Register to the web application.
- [ ] Login to the web application.
- [ ] Logout from the web application
- [ ] Verify my account by verification code on (Email or SMS).
- [ ] Add a new project (Workspace).
- [ ] Add a new section (List) in my project.
- [ ] Edit any section (List) in my project.
- [ ] Delete any section (List) in my project.
- [ ] Add a new task in sections.
- [ ] Edit any task in any section.
- [ ] Delete any task in any section.
- [ ] Select the task status (To Do, In Progress, Done, etc...).
- [ ] Move any task or section in my project (Drag & Drop).
- [ ] Filter my tasks in the project.
- [ ] Show any activity from any member in the project.
- [ ] Show project I am (admin or member) on it.
- [ ] Show my tasks in all projects.
- [ ] Show my profile page.
- [ ] Show any user profile page.
- [ ] Deactivate or Activate my account.
- [ ] Edit my profile page.

2. As a admin I can:
- [ ] Add member to my project.
- [ ] Delete member from my project.
- [ ] Edit member Role (Viewer, Editor, Admin).






## Backend Routes

## Signup Route
Title: POST/signup 
labels: Back - Route
Description: create user account
Protected: No
Required middleWares: No

#### Request body
{
  email,
  username,
  password
}

#### Response
Successs : {data, message: 'Account Created Successfully'} & status: 201
Failure: {message} & status: 400 // Bad Request 
{message} & status: 401 // validation fails

#### Errors
email exist? 409
wrong password? 401
invalid email? 400

#### Schema 
 
{
  email: string()
  .email()
  .required(),
  
  username: string()
  .min(3)
  .max(20)
  .required(),
  
  password: string()
  .min(8)
  .required()
}

#### Tests
 all our status code
 201 => success
 400 => bad request 'invalid email'
 401 => wrong password
 409 => Conflict (Email exist)
 

## Signin Route
Title: POST/signin 
labels: Back - Route
Description: Login user account
Protected: No
Required middleWares: No

#### Response:
Successs : {data: {email, username} , status: 200, message: 'Logged in Successfully'}
Failure: {message: 'invalid email, email doesn't exist, status: 400} // Bad Request 
{message: 'Wrong password', status: 401} // validation fails

#### Errors
email not exist? 400
wrong password? 401

#### Request body:
{
  email: 'y',
  password: 'z'
}

#### schema 
 
{
  email: string()
  .email()
  .required(),
  
  password: string()
  .min(8)
  .required()
}

#### Tests:
 all our status code
 200 => success
 400 => bad request 'invalid email'
 401 => wrong password


## verifiation
## Get Projects Route
Title: GET/projects 
labels: Back - Route
Description: Get all user projects
Protected: Yes, signed in only
Required middleWares: check auth

#### Response:
Successs : {data: {name, id} , status: 200},
 {data , status: 204} // No projects
Failure: {message: 'Server Error', status: 500}

#### Errors
server Error? 500

#### Tests:
 all our status code
 200 => success
 204 => no projects
 500 => server error




## Add Project Route
Title: POST/project 
labels: Back - Route
Description: add project
Protected: Yes, signed in only
Required middleWares: check auth

#### body: 
{name, description}, userId from cookies

#### Response:
Success: { data: {id, name}, message }

#### Errors
server Error? 500




## Edit Project Route
Title: PUT/project/id
labels: Back - Route
Description: Edit project
Protected: Yes, signed in only
Required middleWares: check auth

#### Response:
Successs : {data: {name, id} , status: 200},
 {data , status: 204} // No projects
Failure: {message: 'Server Error', status: 500}

#### Errors
server Error? 500



## Delete Project Route
## Single Project Route
## Get Sections Route
## Add Section Route
## Edit Section Route
## Delete Section Route
## Get Tasks Route
Title: GET/tasks
labels: Back - Route
Description: Get all tasks to the user
Protected: Yes
Required middleWares: check auth

Request body:none

Response
Success: { data: {tasks}, message } & status: 200&204
Failure: {message: 'Server Error'} & status: 500

Errors
server Error? 500
## Get All Tasks In Specific Section 
Title: GET/tasks/:id
labels: Back-Route
Description: Get all tasks in a specific section
Protected: Yes
Required middleware: check auth

Request body:
sectionId: params.id

Response
Success:{ data: { id, name, description, priority, endDate, status}, msg } & status(200, 204)
Failure: {message: 'Server Error'} & status: 500

Errors
server Error? 500

## Add Task Route

## Edit Task Route
## Delete Task Route









```

.env file

// Database Links
DB_URL_DEV=postgres://taskillo:123456@localhost:5432/taskillo

// Twilio Variables
TWILIO_ACCOUNT_SID=ACae5dcdfbed9ab509b91589cac89f4de3
TWILIO_AUTH_TOKEN=a8c13fb38df20aef471a62aee17e1f7d
TWILIO_VERIFY_SERVICE_SID=VA2c42c4cdcf3c7a12dce262253ff2243c

// Cloudinary Variables
CLOUDINARY_NAME=ds6c49pi2
CLOUDINARY_API_KEY=236528739687218
CLOUDINARY_API_SECRET=caNu9CoENkohsTD8Z4gC4SQf0Ss

// Tool For Tests
TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJhbXJhbk1hc3JpIiwiaWF0IjoxNjUyMjA5OTY3fQ.dSmJcF9jnUEjc1d7JR9qKl-p97K4_boZJQ6LnzvFG90
SECRET_KEY=amran@ww2345
email: amran@gmail.com
password: 222222222 





```