How justfrenzy22/yanstribe works
Based on our analysis of the file tree and README, this project is a full‐stack social media application (named “YansTribe”) inspired by Facebook and Instagram. It comprises a client-side front-end (built with Next.js/React and Tailwind CSS), a robust server-side back-end (an ASP.NET MVC application with controllers, views, and services), a clearly defined data access layer (DAL and the similar DALe projects that encapsulate database interactions and repository patterns), core domain logic (in the “core” directory with entities, models, and mappers), and an underlying SQL database (with an SQL creation script provided). Additionally, there is a testing project (“TestBackend”) to run integration/unit tests against the back-end logic.
Main Components
• Client (Front-end):
• “client” directory containing Next.js configuration, React components, API utilities, and styling (tailwind.config, css files).
• That it handles user interactions, authentication flows, and presentation.
• Server (Back-end):
• “server” folder containing Controllers (AdminController, UserController, HomeController, BaseController), Services (AuthService, HashService), Managers, Mappers, and Views.
• MVC structure (Controllers, Views, Models) and integration with authentication and business logic.
• Data Access Layer (DAL/DALe):
• Components from “DAL” and “DALe” directories responsible for repositories, query building (queries directory), requests, responses, and exception handling.
• Use of interfaces and repository patterns.
• Core Domain:
• “core” folder that houses domain entities (like User, Post, Chat, Comment, etc.), enums (e.g., Role, FriendStatus), and mappers.
• Database:
• Use the “database” folder and DB scripts to indicate the persistence mechanism.
• Testing:
• A component for “TestBackend” where MSTest-based tests run to validate back-end functionality.
• External Integration/Configuration:
• Components for CI/CD integration (as alluded to in the README) and deployment settings (the presence of appsettings.json, environment files, and GitLab CI configuration notes).
Relationships and Data Flow
• Within the Server, indicate the flow from Controllers to Services/Managers and onward to the Data Access Layer.
• DAL interacting with the Database for queries, insertions, updates, and deletions.
• Optionally, demonstrate the Core as the shared set of models/entities used by both the Server and DAL components.
• In testing flows, note that TestBackend simulates calls into these server endpoints or DAL methods.
Architectural Patterns & Design Principles
• Layered architecture: Clearly separate presentation (Client), business logic (Server/Services), data access (DAL/DALe), and domain models (Core).
• MVC pattern in the server-side: Controllers managing requests, Services performing business logic, and Views responsible for rendering responses.
• Use of Repository and Mapper patterns in the DAL and Core layers.
• Dependency inversion through interfaces (see interfaces folders in DAL and server).
Technologies and Frameworks
• Client uses Next.js, React, Tailwind CSS, and likely ESLint for code quality.
• The back-end is built with ASP.NET (with MVC patterns), using C# projects (.csproj).
• Database integration is SQL-based (with provided SQL creation queries in the “database” folder).
• Testing is done using MSTest (TestBackend project).
• Version control and CI/CD practices are integrated per GitLab guidelines shown in the README.