How keiter0309/dictiohub-dictionary works
Core Project Components
• Frontend (DA-FE): This is a React-based client application using TypeScript, TailwindCSS, and Ant Design. It is built with Vite and configured with Docker and Nginx for deployment. The directory structure shows a well-structured React app with components, pages (for admin and client views), routing, styling, and state management (stores with Redux slices).
• Backend (DA-BE): This Node/Express server uses Prisma ORM for MySQL database interactions, and integrates AWS services (Polly for audio, S3 for storage). The backend code is organized by features such as authentication, word handling, admin controllers, audio controllers, and more. It further includes utility functions, middlewares (auth, CORS, rate limiter) and database connection handling.
• Database: A MySQL database is used, with Prisma managing the schema and migrations (located under DA-BE/prisma) including initial migrations and seed data.
• External Services: AWS Polly for synthesizing audio content and AWS S3 for handling storage.
Relationships and Data Flow
• The backend handles these requests by interacting with the MySQL database via Prisma ORM. Show the backend as making SQL queries and reading/updating data.
• Docker: Both the frontend and backend have Dockerfiles and docker-compose configurations. Include a container orchestration layer to signify deployment consistency across environments.
Architectural Patterns and Design Principles
• Modular Components: The layered structure in both DA-FE and DA-BE, where controllers, routes, services, and models serve their individual purposes.
• Middleware and Security: The backend uses middlewares for authentication, CORS, rate limiting, and role management. Highlight these as key “processing layers” ensuring secure data handling.
• Dockerization: Emphasize containerization for consistent deployment.