How piny940/portfolio works
Main Components
• Frontend Portfolio Application ("app"): This directory contains a Next.js–based client site that handles the public-facing pages. It has its own components, pages (blogs, projects, skills, etc.), styling, and even server-side content.
• Administrative Interface ("admin"): Also built with Next.js, this part provides admin pages and components to manage content (blogs, projects, tech stacks, etc.). It includes its own GraphQL queries and interfaces.
• Backend Service ("backend"): Implemented in Go, this service handles GraphQL endpoints for authentication, blogs, projects, tech stacks, and technologies. It includes domain logic, database interactions (with migration files and models), resolvers, and server setup (including CORS, health checks, etc.).
• Updater Service ("updater"): A Node/TypeScript service that likely automates background tasks such as fetching updates, processing external inputs, and possibly interacting with Slack (as indicated by the slack.ts file). It helps keep the portfolio content updated.
• Database ("db"): Although not explicitly a service, the “backend/db” folder (along with migration files) implies a relational database or similar datastore which is central for persisting portfolio data.
• Infrastructure & CI/CD: This includes Dockerfiles in several directories, docker-compose.yml for multi-container orchestration, an Nginx configuration (reverse proxy), and GitHub Actions workflows for testing, staging, and releases.
Relationships and Interactions
• The public "app" component and the "admin" interface both interact with the "backend" service through GraphQL APIs, although their usage might be slightly different (client consumption vs. admin management).
• The "updater" service may periodically trigger updates or run maintenance tasks, which can in turn update the database or notify external systems (via Slack integration).
• The backend service interacts directly with the database, performing CRUD operations and business logic based on GraphQL resolvers.
• Nginx (defined in the nginx folder) is likely used as a reverse proxy/load balancer routing requests to the appropriate components (app, admin, backend).
• CI/CD pipelines, defined under the .github/workflows folder, automate testing, staging, and release processes for each part of the project.
Architectural Patterns & Technologies
• Frontends: Both “app” and “admin” are built using Next.js, employing server-side rendering (SSR) and/or static site generation (SSG) where needed. Their component structures follow a modular layout.
• Backend: Built in Go; uses GraphQL (with gqlgen) for API communication, following domain-driven design patterns (with clearly separated domain, loader, usecase, and resolver layers). It also uses configuration files and migration scripts to manage database schemas.
• Microservice/Modular Architecture: The system separates concerns clearly by splitting the admin portal, public portfolio application, backend API, and updater into their own discrete services.
• Infrastructure: Docker and docker-compose ensure that the services are containerized and can be deployed reliably. Nginx helps with routing and load-balancing production traffic.