This project aims to create todo app implementations demonstrating basic CRUD (create, read, update, delete) operations on several backend programming languages.
Inspired by TodoMVC, I created this project with the aim of learning new programming languages in a fun way. Simple enough, but still teaches the fundamentals of backend development.
- JavaScript (Node.js)
- Java (Spring Boot)
- TypeScript
- Ruby
- Go
- PHP
- Rust
- C/C++
- Scala
- Swift
- Python
- Ruby
...and many more in the future.
The app, no matter the backend, will connect only into a single MongoDB database and will access the same set of data.
- Make sure that you have MongoDB installed in your system.
- Run
./db/start.shto start the local MongoDB server. - Check out the frontend documentation for instructions on how to prepare the frontend so that it can be served by the backend code of the language of your choosing.
- Choose a backend language in
backendyou want - Let's rock!
A Todo is an object that will have the following data:
- ObjectID
_idacts as the primary key - String
taskdescribes what the Todo is about - Boolean
donemarks the when the Todo is done
The frontend and backend should use the following endpoints:
- GET
/todos- Gets all Todos
- Does not require anything
- Returns an array of Todos
- POST
/todos- Create a new Todo
- Requires Todo data
- Returns new Todo with the generated
_id
- PUT
/todos/{_id}- Updates an existing Todo
- Requires Todo data and
_idto be passed on the URL - Returns a Todo with the updated data (
_idis immutable)
- DELETE
/todos/{_id}- Deletes a Todo
- Requires
_idto be passed on the URL - Returns a JSON object displaying the number of deleted Todos, in this case, only 1 (
{ deleted: 1 })
- DELETE
/todos- Deletes all Todos that are marked
done - Does not require anything
- Returns a JSON object displaying the number (n > -1) of deleted Todos (
{ deleted: n > -1 })
- Deletes all Todos that are marked
© Vincent John Cagay
