For the "Integrated Systems" university project I have to create a FE using a separate project (aka don't use the built-in .NET templating). With this project I intend to solve that, as well as:
- Learn a bit of Rust
- Learn to use Leptos
- Learn how to deploy a Rust project
- Get acquinted with using NeoVim
A few of the technologies/libraries that are currently in the project
- Leptos
- TailwindCSS
- serde
- chrono
- reqwest
- WASM
- Actix (mainly for serving the site and CSS since I am using SSR)
To serve as the FE UI for this project of course, with some changes in said project as well. I plan to have both of them running separately and then have this project send over requests when needed for a component. Would've been nice if I also re-wrote the BE logic into Rust using actix or axum but what you gonna do, them's the rules :(
If we assume you have everything installed, and you are on windows then you can run the start.ps1
script, otherwise you can run the following commands:
npx tailwindcss -i ./input.css -o ./style/output.css --watch
cargo leptos watch
as separate commands.
In case you don't have something installed, please follow the guide in this repo since the original configuration was taken from there and then updated/expanded on.
This should be a sufficient list for required changes
- Implement base template (header/footer/base body)
- Implement the Home Page
- Implement the Index pages for each menu item in the navigation bar
- View Slot Index Page
- View Slot Create Page
- View Slot Edit Page
- Authentication
- View Slot Tickets Pages
- Tickets Index Page
- Tickets Export Page (with all related functionality)
- Baseline the tickets page
- Connect directly to BE
- Deserialize data since keys are using different cases
- Style the table
- Implement "Shopping Cart Index Page"
- Implement Stripe (https://docs.rs/stripe-rust/latest/stripe/)
- Implement Orders pages
- Implement Users Management page
- Implement all required functionalities (CRUD essentially)
- Implement different displays based on user role
- Test for bugs
- Implement register
- Implement logout
- Implement Dockerfile for deployment
In regards to deployment:
- Find a good site to deploy Rust on (for now DigitalOcean looks like a decent choice, do more research on YT though) - works well with Digital Ocean Droplets
- Deploy BE on Azure if still have credits - deployed on Digital Ocean Kubernetes Cluster
- Deploy Rust manually first
- Add kubernetes files
- Add .dockerignore file
- Setup github actions for deployment
- Add 'push-to-deploy' code to the pipelines
- Test out deployment with actual change on application
- Mimic on BE side as well
Also in regards to maintanance:
- Clean-up all/most leptos & Rust warnings
- Remove hard-coded BE server path and add some extra configuration on top of it
- Add time-out for token (aka, automatically clean-up invalid sessions)
- Figure out problem with User Role Claims - token was just expired most likely, works fine now
Things that I'd like to add if I have time or feel like doing:
- Make components more generic
- Implement a # column to the tables which properly updates, but only itself gets updated, not entire DOM of the table
- Re-organize the code-base to be easier to navigate and access structs/traits/impls
- Add "redirects" if user is not authenticated - Partially implemented
- Implement user details page (page where the user can update their own information)
- Implement logic for config which determines which deployment.toml it should use