A comprehensive fuel quota management system connecting vehicle owners, fuel station owners, and administrators.
- Backend: Java Spring Boot with JWT authentication, JPA, and PostgreSQL
- Frontend: 3 Next.js applications (Vehicle, Station, Admin)
- Mobile: Expo/React Native app for fuel station operators
- Database: PostgreSQL with dual connections (quota.app + DMT)
- Java 17+
- Node.js 18+
- PostgreSQL
- Bun (package manager)
-
Clone the repository
git clone https://github.com/InduwaraSMPN/quota.app.git cd quota.app -
Backend Setup
cd backend # Copy environment template cp src/main/resources/application-example.properties src/main/resources/application.properties # Copy environment variables template cp ../.env.example ../.env
-
Configure Environment Variables
Edit
.envfile with your actual values:# Twilio Configuration (for SMS notifications) TWILIO_ACCOUNT_SID=your-twilio-account-sid TWILIO_AUTH_TOKEN=your-twilio-auth-token TWILIO_PHONE_NUMBER=your-twilio-phone-number TWILIO_ENABLED=true
-
Start Backend
cd backend ./mvnw spring-boot:run -
Start Frontend Applications
# Vehicle Owner Frontend (Port 3000) cd frontend-vehicle bun install bun dev # Station Owner Frontend (Port 3001) cd frontend-station bun install bun dev # Admin Frontend (Port 3002) cd frontend-admin bun install bun dev
-
Start Mobile App
cd mobile-app/quota.app bun install bun start
The application uses environment variables for sensitive configuration:
- Twilio Credentials: Used for SMS notifications in the mobile app
- Database Credentials: PostgreSQL connection details
- JWT Secrets: For authentication token generation
.env- Environment variables (ignored by git)backend/src/main/resources/application.properties- Main configurationbackend/src/main/resources/application-example.properties- Template with safe defaults
- Never commit actual credentials to git
- Use environment variables for all sensitive data
- The
.envfile is automatically ignored by git - Use the provided example files as templates
- Vehicle registration and management
- QR code generation for fuel purchases
- Quota tracking and consumption history
- Profile management
- Fuel inventory management
- Transaction processing via QR code scanning
- Sales analytics and reporting
- Station profile management
- User management (vehicle owners, station owners, admins)
- System-wide analytics and reporting
- Fuel consumption statistics
- Station and vehicle oversight
- QR code scanning for fuel transactions
- Real-time quota validation
- SMS notifications via Twilio
- Offline transaction support
The system uses PostgreSQL with two main databases:
- quota.app: Main application data
- DMT: Department of Motor Traffic integration
- Backend: Spring Boot, Spring Security, Spring Session, JPA/Hibernate
- Frontend: Next.js 14, TypeScript, Tailwind CSS, Shadcn UI
- Mobile: Expo, React Native, React Navigation
- Database: PostgreSQL
- Authentication: JWT tokens
- Notifications: Twilio SMS
- TypeScript for type safety
- Shadcn UI components for consistent design
- Responsive design patterns
- Sonner toast notifications
- Multi-step forms with validation
This project is licensed under the MIT License.
- Fork the repository
- Create a feature branch
- Make your changes
- Ensure all tests pass
- Submit a pull request
For support and questions, please open an issue on GitHub.