This is a full-stack application for managing university practical training programs. The system consists of a Node.js/Express backend with TypeScript and a React frontend with Vite.
- Runtime: Node.js with TypeScript
- Framework: Express.js
- Database: SQLite (with Sequelize ORM)
- Authentication: JWT tokens with bcrypt for password hashing
- File Upload: Multer for handling file uploads
- Email: Nodemailer for email functionality
- Validation: Express-validator for request validation
Backend/
├── src/
│ ├── @types/ # TypeScript type definitions
│ ├── config/ # Database configuration and connections
│ ├── constants/ # Application constants
│ ├── controllers/ # Route controllers (business logic)
│ │ ├── AuthController.ts
│ │ ├── CompanyController.ts
│ │ ├── EvaluationController.ts
│ │ ├── StatisticsController.ts
│ │ ├── StudentController.ts
│ │ ├── TrainerController.ts
│ │ ├── TrainingController.ts
│ │ ├── TrainingRequestController.ts
│ │ └── UserController.ts
│ ├── enums/ # Application enums
│ ├── middlewares/ # Express middlewares
│ │ ├── cors.ts
│ │ ├── errorHandler.ts
│ │ ├── handleValidationResult.ts
│ │ ├── index.ts
│ │ ├── verifyAccessToken.ts
│ │ ├── verifyResetToken.ts
│ │ └── verifyRole.ts
│ ├── models/ # Sequelize database models
│ │ ├── Answer.ts
│ │ ├── AnsweredQuestion.ts
│ │ ├── Associations.ts
│ │ ├── Company.ts
│ │ ├── CompanyBranch.ts
│ │ ├── CompanyField.ts
│ │ ├── Evaluation.ts
│ │ ├── Field.ts
│ │ ├── index.ts
│ │ ├── Note.ts
│ │ ├── Permission.ts
│ │ ├── Question.ts
│ │ ├── Role.ts
│ │ ├── Student.ts
│ │ ├── Trainer.ts
│ │ ├── Training.ts
│ │ └── User.ts
│ ├── routes/ # API route definitions
│ │ ├── AuthRouter.ts
│ │ ├── CompanyRouter.ts
│ │ ├── EvaluationRouter.ts
│ │ ├── FileRoute.ts
│ │ ├── index.ts
│ │ ├── RoleRouter.ts
│ │ ├── StatisticsRouter.ts
│ │ ├── StudentRouter.ts
│ │ ├── TrainerRouter.ts
│ │ ├── TrainingRequestRouter.ts
│ │ ├── TrainingRouter.ts
│ │ └── UserRouter.ts
│ ├── services/ # Business logic services
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions
│ ├── validators/ # Request validation schemas
│ ├── app.ts # Express app configuration
│ └── server.ts # Server entry point
├── database.sqlite # SQLite database file
├── nodemon.json # Nodemon configuration
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── yarn.lock # Yarn lock file
- Authentication & Authorization: JWT-based auth with role-based access control
- File Management: File upload and management capabilities
- Email Integration: Password reset and notification emails
- Data Validation: Comprehensive request validation
- Database ORM: Sequelize for database operations
- Security: CORS, authentication middleware, password hashing
npm run dev: Start development server with nodemonnpm run start: Start production servernpm run build: Build TypeScript to JavaScript
- Framework: React 18 with TypeScript
- Build Tool: Vite
- UI Library: Material-UI (MUI) v5
- State Management: React Query (TanStack Query)
- Routing: React Router DOM v6
- Forms: Formik with Yup validation
- Charts: Chart.js with react-chartjs-2
- Internationalization: i18next
- Testing: Vitest with Testing Library
Frontend/
├── src/
│ ├── api/ # API service functions
│ │ ├── addField.ts
│ │ ├── forgetPassword.ts
│ │ ├── getAllFields.ts
│ │ ├── getBranch.ts
│ │ ├── getCompany.ts
│ │ ├── getEvaluation.ts
│ │ ├── getQuestions.ts
│ │ ├── index.ts
│ │ ├── logout.ts
│ │ ├── progress.ts
│ │ ├── types.ts
│ │ └── verifyAccessToken.ts
│ ├── components/ # Reusable UI components
│ │ ├── AccountMenu/
│ │ ├── AppMenu/
│ │ ├── AppMenuItem/
│ │ ├── AppNavbar/
│ │ ├── AppSideDrawer/
│ │ ├── AppSideDrawerMultiLevel/
│ │ ├── DataGrid/
│ │ ├── DataGridTanstack/
│ │ ├── FormsUI/
│ │ ├── hooks/
│ │ ├── Inputs/
│ │ ├── Language/
│ │ ├── Transition/
│ │ ├── constants.ts
│ │ └── types.ts
│ ├── constants/ # Application constants
│ ├── containers/ # Container components
│ ├── context/ # React context providers
│ ├── ErrorBoundary/ # Error boundary components
│ ├── hooks/ # Custom React hooks
│ ├── icons/ # Icon components
│ ├── images/ # Image assets
│ ├── locals/ # Localization files
│ ├── lotties/ # Lottie animation files
│ ├── pages/ # Page components
│ │ ├── AccessDenied/
│ │ ├── Admin/
│ │ ├── company/
│ │ ├── Dashboard/
│ │ ├── DataGridInfinitePlayground/
│ │ ├── DataGridPaginatedPlayground/
│ │ ├── EditorPlayground/
│ │ ├── ForgetPassword/
│ │ ├── Home/
│ │ ├── InfiniteScrollPlayground/
│ │ ├── LandingPage/
│ │ ├── Login/
│ │ ├── NotFound/
│ │ ├── resetPassword/
│ │ ├── Student/
│ │ ├── trainer/
│ │ └── university/
│ ├── routes/ # Routing configuration
│ │ ├── AppRoutes.tsx
│ │ ├── constants.tsx
│ │ ├── hooks/
│ │ ├── index.ts
│ │ ├── ProtectedRoute.tsx
│ │ ├── types.ts
│ │ └── utils/
│ ├── styling/ # Theme and styling
│ ├── types/ # TypeScript type definitions
│ ├── UnexpectedError/ # Error handling components
│ ├── utils/ # Utility functions
│ ├── App.tsx # Main App component
│ ├── i18n.tsx # Internationalization setup
│ ├── index.css # Global styles
│ ├── main.tsx # Application entry point
│ ├── queryClient.ts # React Query configuration
│ ├── setupTests.ts # Test setup
│ └── vite-env.d.ts # Vite type definitions
├── public/ # Static assets
├── index.html # HTML template
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── tsconfig.node.json # Node TypeScript configuration
├── vite.config.ts # Vite configuration
└── yarn.lock # Yarn lock file
- Modern React: Functional components with hooks
- Material Design: MUI components with custom theming
- Data Management: React Query for server state
- Form Handling: Formik with comprehensive validation
- Routing: Protected routes with authentication
- Internationalization: Multi-language support
- Data Visualization: Charts and data grids
- Error Handling: Error boundaries and user feedback
- Performance: Code splitting and lazy loading
npm run dev: Start development server (port 3500)npm run build: Build for productionnpm run preview: Preview production buildnpm run test: Run tests with Vitestnpm run format: Format code with Prettier
The application uses SQLite with the following main entities:
- Users: Authentication and user management
- Students: Student information and profiles
- Trainers: Trainer/mentor information
- Companies: Company and branch information
- Trainings: Training program details
- Evaluations: Training evaluations and assessments
- Questions & Answers: Evaluation questionnaire system
- Navigate to Backend directory
- Install dependencies:
yarn install - Configure environment variables
- Run database migrations:
npm run build && npm start - Start development server:
npm run dev
- Navigate to Frontend directory
- Install dependencies:
yarn install - Start development server:
npm run dev - Application will be available at http://localhost:3500
- Backend: MVC pattern with Express.js
- Frontend: Component-based architecture with React
- State Management: Server state with React Query, local state with React hooks
- Authentication: JWT tokens with role-based access control
- API Communication: RESTful APIs with Axios
- JWT authentication
- Password hashing with bcrypt
- CORS configuration
- Input validation and sanitization
- Role-based access control
- File upload security
- Linting: ESLint with TypeScript support
- Formatting: Prettier
- Git Hooks: Husky with lint-staged
- Type Checking: TypeScript strict mode
- Hot Reload: Nodemon (backend), Vite (frontend)