How amber-williams/portfolio-website works
Main components
• Frontend Application:
• The “pages” directory (e.g. index.tsx, blog pages, and dynamic routes like [blog].tsx and [study].tsx) shows that routing and page rendering are managed via Next.js.
• Backend / Cloud Services with AWS Amplify:
• The “amplify” directory contains configurations, backend configurations, and resource definitions. This indicates that AWS Amplify is used for provisioning and managing cloud resources (such as authentication, storage, databases, and possibly API gateway functions).
• External CMS Integration:
• The README instructs to copy the .env.example with the CMS server API key. This detail signifies that there is an integration point to an external CMS server (perhaps for content management on case studies or blogs).
• Supporting Utility Libraries:
• Under the “lib” directory, files such as amplify.ts, api.ts, and blog.tsx suggest custom helper functions for interacting with Amplify services and external APIs.
• Content Repository:
• The “content” folder (with case studies defined in YAML) represents dynamic content that typically gets rendered on the site, likely processed via modules (such as CustomMarkdown) and then integrated with the frontend.
Relationships and Interactions
• The Frontend (Next.js and React components) renders pages dynamically using data from:
• AWS Amplify backend services (authentication, data storage, API endpoints).
• The external CMS, with secrets provided via the environment file, which likely supplies dynamic content for blogs and case studies.
• The Utility Libraries serve as connectors between the Frontend and backend or third-party services, encapsulating logic for API calls and data transformation.
• Static assets under the “public” folder (images, documents) are served directly to enhance the UI.
• The project uses Amplify’s configuration files and scripts (e.g., amplify.yml, amplify/cli.json) to deploy and manage these services in the cloud.
Architectural Patterns and Design Principles
• Component-Based UI: The directory “components” is organized by feature (e.g., About, Avatar, BlogsSection), which aligns with modern React practices of reusability and separation of concerns.
• Server-Side Rendering (SSR) / Static Site Generation (SSG): Being a Next.js project, it likely uses these paradigms for improved performance and SEO.
• Cloud-First Approach: By utilizing AWS Amplify, the application adheres to a cloud-enabled architecture, abstracting much of the backend configuration and deployment workflow.
• Separation of Concerns: With distinct folders for components, content, library logic, and type definitions, the project follows modular design principles.
• Frontend Application (Next.js/React)
▫ Pages (routing, SSR/SSG)
▫ UI Components (diverse features such as NavBar, Footer, PageContainer, CustomMarkdown)
• Backend Cloud Services (AWS Amplify)
▫ Configuration and deployment resources (amplify/.config, amplify/backend)
▫ API and possibly serverless functions
• External Services:
▫ CMS Server (with the API key provided via .env)
• Utility Libraries (lib directory)
▫ API and data fetching logic
• Content Repository (content folder)
▫ Dynamic content for case studies and blogs
• How user interactions in the Frontend make API calls (via the lib) to Amplify services.
• The data flow from the external CMS into the frontend (either directly or through Amplify functions).
• Rectangles for application components
Detail and Clarity
• Every component is clearly labeled.
• Notes on any architectural patterns such as SSR/SSG and component-based UI design.
• Don’t shy away from decomposing the system into multiple logical components so that each service (frontend, backend, external CMS, utility layers) can be understood at a glance.
• This granularity will aid in understanding dependencies, data flow, and the overall high-level architecture.