Skip to content

Maiveasna/todo-list

Repository files navigation

logo

VPOST24 TODO

Overview

Hello Dear,

I'm Mai Veasna, Currently, I'm a full-stack developer, and I grew up in the beautiful world 😁.I make this project for a simple todo list and open source for sharing with those who want to test.The below section will show about instruction to use that project.

Have fun and happy coding! 😁😁

Features

  • Summary data on dashboard
  • Recently todo list
  • List all of todo list
  • Create a todo
  • Edit a todo
  • Delete todo
  • Filter todo list
  • Toggle for mark as completed or incompleted
  • APIs (get,delete,update) in below for that instruction
  • About Us

Getting Started

source

https://github.com/Maiveasna/v_tech

url for test

https://v-tech-rho.vercel.app/

First install dependent

yarn 
#or
npm  install
#or
pnpm

Set up

Create a .env and add variable DATABASE_URL and assign the value with your database URL. please check simple on file env.simple

Datase / PostgreSQL

To run migrate data base, run the following command

 yarn prisma migrate dev
 #or
 npm run prisma migrate dev
 #or
 pnpm  prisma migrate dev

run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.


CRUD APIs

base url

https://v-tech-rho.vercel.app

get todo list

GET / ${base_url}/api/todo
Parameters
name type data type description
limit none number N/A
filter require string N/A
Responses
http code content-type response
200 application/json { "data" : "Array JSON", "meta" : "JSON" , "link" :"JSON" }
Example cURL
${base_url}/api/todo

Creating new todo

POST / ${base_url}/api/todo
Parameters
name type data type description
uuid required uuid N/A
todo required string N/A
isCompleted required string N/A
createdAt required timestamp N/A
Responses
http code content-type response
201 application/json {"code":"201","message":" Created successfully" , "data" : "JSON"}
400 application/json {"code":"400","message":"Bad Request"}
405 text/html;charset=utf-8 None
Example cURL
 ${base_url}/api/todo

Updating Todo

PUT ${base_url}/api/todo/{id}
Parameters
name type data type description
todo required string N/A
isCompleted required string N/A
Responses
http code content-type response
201 application/json { "message" : "Updated successfully"}
400 application/json {"code":"400","message":"Bad Request"}
405 text/html;charset=utf-8 None
Example cURL
  ${base_url}/api/todo/${id}

Delete todo

DELETE /api/todo/{id}
Parameters
name type data type description
uuid required uuid N/A
Responses
http code content-type response
200 application/json { "message" : "Delete successfully"}
Example cURL
${base_url}/api/todo/${id}

Tech Stack

Client: React,TailwindCSS, NextJs V.13,

Server: AWS,Vercel,

Database: PostgreSQL,

Backend: Prisma, NodeJs,

Authors

Support

For support, email [email protected]