an API service made for the needs of scholarship registration for students to ease the burden of registering for lectures
Server: Rust, Postgresql, Actix Web
- Authentication system
- Middleware
- Database model
- Database schema
- Database migration
- Unit test
When i make this service, i feel like this project has good performance than the other like laravel and express. After some update i learn something that i think i don't get it before, like i get better when search problem error, implement new system and server security.
Clone the project
git clone https://github.com/Sleepy4k/rust-scholarmate-api
Go to the project directory
cd rust-scholarmate-api
Install dependencies (if you already install sqlx-cli than skip it)
cargo install sqlx-cli
Copy .env file
copy .env.example .env
Create database (if you already create one and make sure you already setting up .env file)
sqlx database drop
Create database (make sure you already setting up .env file)
sqlx database create
Migrate database (make sure you already setting up .env file)
sqlx migrate run
Build the server
cargo build
Start the server
cargo run
Start the server (for production)
cargo run --release
Enabling auth service
cargo run --bin auth_service
Enabling export data
cargo run --bin export_data
Enabling websocket service
cargo run --bin ws_service
Want to run all service and run for production? build all service and run it in release mode (run it from target/release)
cargo build --release
cargo build --release --bin export_data
cargo build --release --bin auth_service
cargo build --release --bin ws_service
To run this project, you will need to add the following environment variables to your .env file
DATABASE_URL
JWT_TOKEN_TITLE
JWT_TOKEN_SECRET
- Rust Lang
- Actix Web
- Sqlx
- Sqlx CLI
- Unit Test
- Example
- Validator
- CSV Writer
- XLSX Writer
- Argon2
- Maud
- Tokenizer
- Lettre
If you have any feedback, please reach out to us at sarahpalastrin@gmail.com