A secure and app for managing student finances, built with Rust and MongoDB. This service provides user authentication, balance management, and transaction handling with real-time system metrics monitoring.
-
User Account Management
- User registration and authentication
- Secure password encryption using Caesar cipher (Note: for educational purposes only)
- Balance tracking and management
-
Transaction System
- Real-time money transfers between users
- Transaction history tracking
- Transaction reversion capability
- Automatic balance updates
-
System Monitoring
- CPU usage metrics
- Memory usage tracking
- Prometheus integration for metrics collection
- Backend: Rust with Actix-web framework
- Database: MongoDB
- Monitoring: Prometheus metrics
- System Stats: systemstat for resource monitoring -Frontend: Vue.js
GET /- Health check endpointPOST /user/login/{email}/{password}- User loginPOST /user- Create new userPUT /user/{id}- Update user detailsDELETE /user/{id}- Delete userGET /user/{id}- Get user details
GET /user/transactions/{id}- Get user's transaction historyPOST /transaction- Create new transactionPUT /transactionx/- Revert transaction
GET /metrics- Prometheus metrics endpoint
- Rust (latest stable version)
- MongoDB
- Cargo (Rust package manager) -Vue.js
- Clone the repository
git clone [repository-url]- Install dependencies
cargo build-
Configure MongoDB connection
- Ensure MongoDB is running locally
- Update connection settings if necessary
-
Run the application
cargo runThe server will start on localhost:8080
- The current password encryption uses a basic Caesar cipher for educational purposes
- For production use, implement a proper cryptographic hashing algorithm
- Ensure proper authentication and authorization mechanisms are in place
- Review and update security measures before deploying to production
The application includes built-in monitoring capabilities:
- CPU usage tracking
- Memory usage monitoring
- Prometheus metrics available at
/metrics