How phanxuanquang/engace works
Project Type and Purpose
• EngAce is a full-stack application designed to help Vietnamese learners improve their English. It offers multiple interactive features such as an intelligent dictionary, personalized assignments, writing reviews, and an AI-powered chatbot.
• The project leverages a .NET-based backend (found under EngAce.Api) and frontend applications implemented in Next.js/React (as seen in the engace.neo and engace.next directories). It is structured as a monorepo with separated concerns for API services, shared entities, event-driven components, helper libraries, and clearly delineated frontend apps.
File Structure
• The backend is housed in the EngAce.Api directory. It follows a standard .NET structure with controllers for various features (Assignment, Chatbot, Dictionary, Healthcheck, Review) and configuration files (appsettings, service dependencies, project files).
• Shared logic and domain models are contained in the Entities directory, while the Events directory encapsulates scopes (for Chat, Healthcheck, Quiz, Review, and Search) indicating an event-based or messaging component in the design.
• Helper functions reside in a dedicated Helper library to support both backend and frontend needs.
• Two frontend directories (engace.neo and engace.next) indicate that the project may have experimented with or supports multiple UI approaches. Both follow Next.js conventions (pages, layouts, components, contexts) and include comprehensive UI components (for chat, assignments, dictionary, writing review, etc.), configuration files, and styling.
• Backend API Server:
• Represented by EngAce.Api, including controllers for each significant feature (intelligent dictionary, assignment generation, writing review, chatbot interactions).
• Configuration management and dependency injections (as seen in appsettings, service dependencies).
• Domain and Event Systems:
• Entities library, representing shared domain models (such as ChatResponse, Comment, Conversation, Quiz, etc.) that underpin the logic in the controllers.
• Optionally, you may note that the Helper library provides additional support to the API.
• Frontend Applications:
• Intelligent Dictionary pages/components.
• Assignment pages (with adaptive learning and quiz generation components).
• Writing review pages designed for detailed feedback.
• Chat interfaces that include controls and message displays.
• That these components orchestrate UI interactions (submission of data, displaying API results) and use common libraries (like context providers, hooks, and UI components).
• External Services and Integration Points:
Architectural Patterns and Design Principles
• Separation of concerns: The backend isolated by controllers, domain logic in Entities and Events, and independent frontend apps.
• Incorporate microservices principles if needed by clearly separating each functional domain (dictionary, assignment, writing review, and chatbot) even if they run as part of a single API project.
• Usage of modern frameworks and libraries: .NET for the API, and Next.js/React for the frontends.
Instructing the Principal Software Engineer
• Subdivide each major component:
• Under the Backend, include subcomponents for Controllers (Assignment, Chatbot, Dictionary, etc.), Domain Models (Entities), Event Handlers (Events), and Helper utilities.
• Under the Frontend, sketch out the page flow for each feature (chat, assignment, dictionary, writing review) reflecting the file structure in engace.neo and engace.next.