OrderFlux is a robust full-stack order management system engineered to streamline the entire order lifecycle between administrators and regional distributors. Built with a modern tech stack featuring Spring Boot (Java) for backend operations and Next.js (TypeScript) for the frontend interface, this application delivers enterprise-grade performance with an intuitive user experience.
-
π Admin Dashboard
- Create and assign orders
- Global visibility across all regions
- Comprehensive monitoring capabilities
- System configuration management
-
π Distributor Portal
- Region-specific order management
- Real-time status updates
- π Order Creation - Intelligent form with validation and region assignment
- π€ Acceptance Flow - Distributor order claiming with accountability tracking
- π Status Pipeline - Granular progression through defined stages:
Preparing β Printed β Packing β Shipped β Delivered
- Java 17 JDK
- Node.js 18+ and npm/yarn
- MongoDB 5.0+
- Maven 3.8+
- Git
-
Clone the repository
git clone https://github.com/Krintox/orderflux.git cd orderflux -
Backend Setup
cd backend # Build and run the application mvn clean install mvn spring-boot:run
-
Frontend Setup
cd frontend # Install dependencies npm install # Run development server npm run dev
-
Access the application
- π Frontend:
http://localhost:3000 - π Backend API:
http://localhost:8080
- π Frontend:
# application.properties
spring.data.mongodb.uri=${DB_URI}
spring.data.mongodb.database=orderflux
jwt.secret=${JWT_SECRET}
jwt.expiration=86400000
server.port=8080- Authentication - Secure login with JWT token generation
- Order Creation - Intuitive form with validation and region assignment
- Oversight - Comprehensive view of all orders with filtering capabilities
- Management - Ability to edit, delete, and track all orders
- Region-Based Access - View only orders assigned to your region
- Order Acceptance - Take ownership of orders with a single click
- Status Updates - Move orders through defined stages with validation
- Completion - Mark orders as delivered with optional feedback
| Endpoint | Method | Description | Access Control |
|---|---|---|---|
/api/auth/register |
POST | Register new user account | Public |
/api/auth/login |
POST | Authenticate and generate JWT | Public |
/api/orders |
GET | Retrieve all accessible orders | Admin: global, Distributor: regional |
/api/orders |
POST | Create new order | Admin only |
/api/orders/{id} |
GET | Get specific order details | Owner or Admin |
/api/orders/{id} |
PUT | Update order information | Owner or Admin |
/api/orders/{id} |
DELETE | Remove order from system | Admin only |
/api/orders/{id}/accept |
POST | Accept responsibility for order | Distributor |
/api/orders/region/{region} |
GET | Filter orders by region | Admin or matching region |
/api/orders/status/{status} |
GET | Filter orders by current status | Admin only |
/api/users/profile |
GET | Get current user details | Authenticated |
/api/analytics/performance |
GET | Retrieve performance metrics | Admin only |
# Backend unit and integration tests
cd backend
mvn test
# Frontend component and integration tests
cd frontend
npm test# Build the JAR file
cd backend
mvn clean package
# Deploy to Koyeb using their CLI
koyeb app init orderflux-api --docker $PWD/target/orderflux-0.1.0.jar# Install Vercel CLI
npm install -g vercel
# Deploy to Vercel
cd frontend
vercel
# For production deployment
vercel --prodFor continuous deployment:
- Connect your GitHub repository to Koyeb and Vercel
- Configure environment variables in their respective dashboards
- Enable automatic deployments on code commits
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure your code follows our style guidelines and includes appropriate tests.
- Spring Boot - Backend framework
- Next.js - Frontend framework
- MongoDB - Database solution
- Tailwind CSS - Utility-first CSS framework
- JWT - Token-based authentication
Built with β€οΈ by Krintox
