How brydzzz/polizarcie works
Project Type and Purpose
• Poliżarcie is a full-stack web platform built with Next.js aimed at helping WUT students discover new eating venues, use an interactive map, write reviews, and even match with other users based on taste.
• The README lists a rich set of integrated technologies (Next.js, React, TypeScript, Redux, Prisma, PostgreSQL, Supabase, AuthJS, Docker, etc.) which indicate that both a dynamic UI and extensive backend logic are in place.
Main Components
a. Frontend/UI Layer:
• Represented by the Next.js application in the “app” directory and the “components” folder.
• Subgroups for:
• Auth pages and components (found under app/(content)/auth and components/auth)
• Browsing, maps, restaurant pages, dashboard pages, and profile pages.
• Various UI elements such as buttons, cards, modals, inputs, headers, sidebars, snackbars, and sections.
• That styling is mostly handled via CSS modules (seen in *.module.scss files) and that the UI integrates with multiple libraries (React, Redux, etc.).
b. Backend/API Layer:
• API endpoints under app/api (specifically for authentication through AuthJS).
• Business logic components and server-specific code (e.g., middleware.ts, next.config.ts, providers.tsx).
• Point out components under the “lib” folder that encapsulate business logic, authentication (lib/auth.ts) and database interactions.
c. Database and ORM:
• Prisma integration by including the prisma folder which contains the schema (prisma/schema.prisma), seeding scripts, and CSV data.
• That Prisma is used as the ORM to interface with a PostgreSQL database (supported by the README images and technology list).
d. State Management and Data Handling:
• Redux-based state management and related store components (lib/store, components that utilize Redux hooks).
• How data flows from database queries (via Prisma) to UI components, often through API endpoints.
e. External Services and Integrations:
• External libraries/services such as:
• AuthJS for authentication (seen in the API routes and auth.ts files).
• Supabase and its image modules (lib/supabase, components/images).
• OpenStreetMap/OpenLayers for map functionalities (referenced in the README images).
• Docker bundled with a Dockerfile for containerized deployment.
Relationships and Data Flow
• Link the Backend/API to the Database layer where Prisma acts as the intermediary. Show two-way communication if there is real-time data synchronization.
• For dynamic and asynchronous data, illustrate how state management via Redux handles client-side data and interacts with the API.
• Connectors from the UI components to external services like AuthJS and Supabase to represent authentication and media handling.
Architectural Patterns and Design Principles
• Separation of concerns: clear division between view (React components and pages), application logic (API and lib layers), and data persistence (Prisma/Database).
• Modular structure found within directories (e.g., auth, dev, dashboard, and other domain-specific modules) that may follow a component-based architecture aligning with React/Next.js best practices.
• The file structure suggests an MVC-like separation — with “pages” acting as controllers, “components” as views, and API/lib/prisma acting as models/data access layers.