This is the backend of my todo list app I named TODAYZZZ TODOS, providing a RESTful API for managing users, collections, and todo items.
For the frontend code, please go to https://github.com/thomasaugot/todayzzz-todo-app-frontend
Before you begin and run the app locally, ensure you have met the following requirements:
- Node.js: You should have Node.js installed on your system. If not, you can download and install it from nodejs.org.
-
Clone this repository to your local machine:
git clone https://github.com/thomasaugot/ts-todo-app-backend
-
Go to the project directory:
cd ts-todo-app-backend
-
Install project dependencies:
npm install
-
Configure environment variables:
Create a .env file in the project root directory and define the necessary environment variables, such as database connection details, as needed. You can use the .env.example file as a template.
DATABASE_URL=your_database_url
PORT=3001
-
Start the server:
npm start
The server should now be running and listening on the specified port.
-
Create a User (Sign Up)
Endpoint: POST /api/users
Request Body: JSON with user information
Response: New user information -
Get User by ID
Endpoint: GET /api/users/:user_id
Response: User information by ID -
Update User by ID
Endpoint: PUT /api/users/:user_id
Request Body: JSON with updated user information
Response: Updated user information -
Delete User by ID
Endpoint: DELETE /api/users/:user_id
Response: No content -
Create a Collection
Endpoint: POST /api/collections
Request Body: JSON with collection information
Response: New collection information -
Get All Collections
Endpoint: GET /api/collections
Response: List of collections -
Get Collection by ID
Endpoint: GET /api/collections/:collection_id
Response: Collection information by ID -
Update a Collection by ID
Endpoint: PUT /api/collections/:collection_id
Request Body: JSON with updated collection information
Response: Updated collection information -
Delete a Collection by ID
Endpoint: DELETE /api/collections/:collection_id
Response: No content -
Create a Todo Item
Endpoint: POST /api/todo_items
Request Body: JSON with todo item information
Response: New todo item information -
Get Todo Item by ID
Endpoint: GET /api/todo_items/:todo_item_id
Response: Todo item information by ID -
Update Todo Item by ID
Endpoint: PUT /api/todo_items/:todo_item_id
Request Body: JSON with updated todo item information
Response: Updated todo item information -
Delete Todo Item by ID
Endpoint: DELETE /api/todo_items/:todo_item_id
Response: No content
This project was built using React, Typescript, Express, Node.js, PostgrSQL, Jest and SCSS.
Access the live website at https://todayzzz-todos.netlify.app/