This project is a simple todo list app written in Rust. It is a learning project for me to learn Rust.
-
Install the
sqlx-cli
for postgres:cargo install sqlx-cli --no-default-features --features postgres
-
Create a
.env
file in theapps/rust-server
folder and add the following:DATABASE_URL="postgresql://postgres:password@localhost:5432/next-rust-todolist"
Replace the
postgres
andpassword
with your own postgres username and password and choose a database name of your choice. -
Run a postgres server, the easiest way is to use docker:
docker run --name postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d next-rust-todolist
-
Create the database:
pnpm db:create
-
Apply the migrations
pnpm migrate:run
-
Run the app:
pnpm dev
-
Run server only (optional)
pnpm dev:server
-
Run web only (optional)
pnpm dev:ui
-
Create a migration
pnpm migrate:create "<migration-name>"
Note: Sqlx requires the database to be running when compiling the Rust server, so make sure to run the postgres server before running
pnpm dev
orpnpm dev:server
. To read more about sqlx and how to use it, check out the sqlx docs.
- Authentication (JWT)
- Register/Login
- Create a todo list
- Update a todo list
- Get all todo lists
- Delete a todo list
- Get a todo list details
- Add a todo item
- Remove a todo item
- Update a todo item
- Get all todo items
- Home page
- Register/Login pages
- Create a todo list
- Add a todo item
- Remove a todo item
- Set a todo item as done
This project is licensed under the MIT License.