How cr3wcr3w/the-portfolio works
Primary Components
a. Frontend:
• Next.js Pages: Represent the entry points (pages/index.tsx, pages/blogs.tsx, pages/blogs/[slug].tsx, pages/_app.tsx, pages/_document.tsx).
• Feature Modules: Separate areas such as “home” and “blogs” that contain dedicated components and helper functions.
• Shared Components: Layout, Header, Footer, Loading states, and custom styling under src/shared.
• Static/Public files: All assets like the public folder content and configuration files (next.config.ts, postcss.config.mjs, etc.).
b. Backend / Data Layer:
• Database Scripts: schema.sql and seed.sql denote the external database schema and sample data.
• Data Access Files: Under src/features/blogs/database, there are files (getBlogs.ts, getBlogById.ts) that fetch data from the DB.
• Supabase Utility: A shared utility file (src/shared/utils/supabase.ts) indicates integration with the Supabase service as part of the data layer.
c. DevOps & Configuration:
• GitHub Workflows (.github/workflows/main.yml) for CI/CD.
• Environment configuration file (env.local).
• ESLint and TypeScript configurations (eslint.config.mjs, tsconfig.json).
• Next.js Frontend as the central “UI Layer” that receives user requests via pages.
• That the Pages connect to various feature components (blogs & home) that encapsulate UI logic.
• That the data-access layer interacts with an external database, using SQL scripts for schema/seed information.
• Supabase integration as an intermediary service that facilitates queries between the application and the database.
• CI/CD pipeline with GitHub Workflows, showing that they deploy/build the application which ultimately reaches a hosting platform (most likely Vercel, as suggested in the README).
Architectural Patterns & Design Principles
• Component-based Architecture: Emphasize how feature-based folders (blogs, home) encapsulate their own components, helpers, and even database interactions.
• Separation of Concerns: Note the clean separation between presentation (React components/pages), shared utility code (e.g., Supabase integration), and the data access layer.
• Modern Web Paradigm: As a Next.js app, it's structured to support server-side rendering as well as static site generation if needed.