A comprehensive full-stack web application for managing food truck vendor operations, including vendor registration, application processing, inspections, reviews, and multi-role dashboards.
- Overview
- Features
- Tech Stack
- Project Structure
- Getting Started
- Demo Accounts
- API Documentation
- Database Schema
- Screenshots
TruXpert is a complete food truck management platform that streamlines the entire workflow from vendor registration to food truck operations. The system supports multiple user roles with dedicated dashboards:
- Vendors - Register, manage brands, submit food truck applications
- Reviewers - Review and approve/reject applications
- Inspectors - Conduct and record food truck inspections
- Admins - Assign reviewers to applications, manage inspectors
- Super Admins - Full system control, user management, analytics
- Vendor registration and authentication
- Brand management (create multiple food truck brands)
- Food truck application submission with document uploads
- Real-time application status tracking
- Menu item management for approved trucks
- Profile management
- Submit applications with required documents (permit, insurance, health certificate)
- Automatic status tracking:
SUBMITTED→IN_REVIEW→APPROVED/REJECTED - Admin assigns reviewers to pending applications
- Reviewers provide detailed feedback on applications
- Admin assigns inspectors to approved food trucks
- Inspectors conduct on-site inspections
- Record inspection results:
PASSED,FAILED,IN_PROGRESS - Detailed inspection notes and recommendations
- Admin Dashboard: Application management, reviewer/inspector assignments, analytics
- Reviewer Dashboard: View assigned applications, submit reviews
- Inspector Dashboard: View assigned trucks, record inspections
- Super Admin Dashboard: Complete user management, system statistics
- Role-based access control
- Protected demo accounts (cannot be edited or deleted)
- Password-protected database seeding
| Technology | Version | Purpose |
|---|---|---|
| Java | 17 | Programming Language |
| Spring Boot | 3.5.4 | Backend Framework |
| Spring Data JPA | - | Database ORM |
| MySQL | 8.0 | Database |
| Lombok | - | Boilerplate Reduction |
| SpringDoc OpenAPI | 2.7.0 | API Documentation |
| Technology | Version | Purpose |
|---|---|---|
| React | 19.2.0 | UI Library |
| React Router | 7.9.6 | Client-side Routing |
| Axios | 1.13.2 | HTTP Client |
| Lucide React | 0.554.0 | Icons |
TRUXPERT/
├── reactapp/ # React Frontend
│ ├── public/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ ├── EditProfile.jsx
│ │ │ ├── NavBar.jsx
│ │ │ └── Footer.jsx
│ │ ├── comps/ # Feature components
│ │ │ ├── AllTrucksSection.jsx
│ │ │ ├── BrandsSection.jsx
│ │ │ ├── MenuSection.jsx
│ │ │ ├── TrucksSection.jsx
│ │ │ └── VendorScreen.jsx
│ │ ├── context/ # React Context
│ │ │ └── ApiContext.js
│ │ ├── css/ # Stylesheets
│ │ ├── dashboards/ # Role-based dashboards
│ │ │ ├── AdminApp.jsx
│ │ │ ├── FoodTruckVendorApp.jsx
│ │ │ ├── InspectorApp.jsx
│ │ │ ├── ReviewerApp.jsx
│ │ │ └── SuperAdminApp.jsx
│ │ ├── navigation/ # Navigation components
│ │ ├── pages/ # Page components
│ │ │ ├── LoginPage.jsx
│ │ │ ├── RegisterPage.jsx
│ │ │ └── SeedPage.jsx
│ │ ├── App.js
│ │ └── RenderComp.jsx # Main routing component
│ └── package.json
│
├── springapp/ # Spring Boot Backend
│ ├── src/main/java/com/examly/springapp/
│ │ ├── controller/ # REST Controllers
│ │ │ ├── AdminController.java
│ │ │ ├── ApplicationController.java
│ │ │ ├── BrandController.java
│ │ │ ├── FoodTruckController.java
│ │ │ ├── InspectionController.java
│ │ │ ├── MenuItemController.java
│ │ │ ├── ReviewController.java
│ │ │ ├── SuperAdminController.java
│ │ │ ├── UserController.java
│ │ │ └── VendorController.java
│ │ ├── model/ # JPA Entities
│ │ │ ├── Application.java
│ │ │ ├── Brand.java
│ │ │ ├── Document.java
│ │ │ ├── FoodTruck.java
│ │ │ ├── Inspection.java
│ │ │ ├── MenuItem.java
│ │ │ ├── Review.java
│ │ │ ├── User.java
│ │ │ └── Vendor.java
│ │ ├── repository/ # Spring Data Repositories
│ │ ├── service/ # Business Logic Services
│ │ ├── exception/ # Custom Exceptions
│ │ ├── DataSeeder.java # Demo Data Generator
│ │ └── SeedController.java # Seeder API Endpoints
│ ├── src/main/resources/
│ │ └── application.properties
│ └── pom.xml
│
└── README.md
- Java 17 or higher
- Node.js 18 or higher
- MySQL 8.0 or higher
- Maven 3.8 or higher
-
Clone the repository
git clone https://github.com/yourusername/truxpert.git cd truxpert/springapp -
Configure Environment Variables
Copy the example environment file and configure your values:
cp .env.example .env
Edit
.envwith your database credentials:DATABASE_URL=jdbc:mysql://localhost:3306/foodtruck?createDatabaseIfNotExist=true DATABASE_USERNAME=root DATABASE_PASSWORD=your_password SEED_PASSWORD=YourSecureSeedPassword123!
-
Run the Spring Boot application
mvn spring-boot:run
The backend will start at
http://localhost:8080
-
Navigate to the React app
cd ../reactapp -
Install dependencies
npm install
-
Configure environment
Copy the example environment file:
cp .env.example .env
Edit
.envwith your backend URL:REACT_APP_URL=http://localhost:8080
-
Start the development server
npm start
The frontend will start at
http://localhost:3000
- Navigate to
http://localhost:3000/seed - Enter your configured seed password
- Click "Run Seeder" to populate demo data
-
Create a new Web Service on Render
- Connect your GitHub repository
- Select the
springappdirectory as root - Set Build Command:
mvn clean install -DskipTests - Set Start Command:
java -jar target/*.jar
-
Configure Environment Variables on Render
Variable Description DATABASE_URLYour MySQL connection URL DATABASE_USERNAMEDatabase username DATABASE_PASSWORDDatabase password SEED_PASSWORDStrong password for data seeder DDL_AUTOSet to updatefor productionSHOW_SQLSet to falsefor productionNote: Render automatically sets the
PORTvariable -
Database Options
- Use a managed MySQL service (PlanetScale, Railway, Aiven, etc.)
- Or set up your own MySQL instance
-
Create a new Static Site on Render
- Connect your GitHub repository
- Select the
reactappdirectory as root - Set Build Command:
npm install && npm run build - Set Publish Directory:
build
-
Configure Environment Variables
Variable Value REACT_APP_URLYour backend Render URL (e.g., https://your-backend.onrender.com) -
Add Redirect Rules
For client-side routing, ensure
_redirectsfile exists inpublic/:/* /index.html 200
After running the data seeder, the following demo accounts are available:
| Password | |
|---|---|
| vendor@gmail.com | Demo@12345 |
| maria.kitchen@gmail.com | Demo@12345 |
| chen.flavors@gmail.com | Demo@12345 |
| rodriguez.foods@gmail.com | Demo@12345 |
| gourmet.group@gmail.com | Demo@12345 |
| street.eats@gmail.com | Demo@12345 |
| urban.bites@gmail.com | Demo@12345 |
| Role | Password | |
|---|---|---|
| Super Admin | superadmin@gmail.com | Demo@12345 |
| Admin | admin1@gmail.com | Demo@12345 |
| Admin | admin2@gmail.com | Demo@12345 |
| Inspector | inspector1@gmail.com | Demo@12345 |
| Inspector | inspector2@gmail.com | Demo@12345 |
| Inspector | inspector3@gmail.com | Demo@12345 |
| Reviewer | reviewer1@gmail.com | Demo@12345 |
| Reviewer | reviewer2@gmail.com | Demo@12345 |
| Reviewer | reviewer3@gmail.com | Demo@12345 |
Note: Demo accounts are protected and cannot be edited or deleted.
Once the backend is running, access the interactive API documentation at:
http://localhost:8080/swagger-ui.html
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/users/login |
User login (Admin, Inspector, Reviewer) |
| POST | /api/users/register |
User registration |
| POST | /api/vendors/login |
Vendor login |
| POST | /api/vendors/register |
Vendor registration |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/vendors |
Get all vendors |
| GET | /api/vendors/{id} |
Get vendor by ID |
| GET | /api/brands |
Get all brands |
| POST | /api/brands |
Create a new brand |
| GET | /api/brands/vendor/{vendorId} |
Get brands by vendor |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/foodtrucks |
Get all food trucks |
| POST | /api/foodtrucks |
Create food truck with application |
| GET | /api/applications |
Get all applications |
| PUT | /api/applications/{id}/assign-reviewer |
Assign reviewer to application |
| PUT | /api/applications/{id}/status |
Update application status |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/reviews |
Get all reviews |
| POST | /api/reviews |
Create a review |
| GET | /api/inspections |
Get all inspections |
| POST | /api/inspections |
Create an inspection |
| PUT | /api/inspections/{id} |
Update inspection |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/dashboard |
Get admin dashboard stats |
| GET | /api/superadmin/dashboard/stats |
Get super admin statistics |
| GET | /api/superadmin/users |
Get all users and vendors |
| POST | /api/superadmin/users |
Create new system user |
Vendor (1) ──────< (N) Brand
Brand (1) ──────< (N) FoodTruck
FoodTruck (1) ────── (1) Application
Application (1) ────── (1) Review
FoodTruck (1) ──────< (N) Inspection
FoodTruck (1) ──────< (N) MenuItem
FoodTruck (1) ──────< (N) Document
| Entity | Description |
|---|---|
| Vendor | Food truck business owners |
| Brand | Food truck brand/franchise owned by vendor |
| FoodTruck | Individual food truck under a brand |
| Application | Permit application for a food truck |
| Review | Reviewer's assessment of an application |
| Inspection | Inspector's on-site inspection record |
| MenuItem | Menu items for approved food trucks |
| Document | Uploaded documents (permits, certificates) |
| User | System users (Admin, Inspector, Reviewer, Super Admin) |
SUBMITTED → IN_REVIEW → APPROVED / REJECTED
ASSIGNED → IN_PROGRESS → PASSED / FAILED
Screenshots coming soon
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
For support, email support@truxpert.com or open an issue in the repository.