-
-
Notifications
You must be signed in to change notification settings - Fork 0
Updated the /docs directory
#537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| { | ||
| "MD007": false, | ||
| "MD010": false, | ||
| "MD013": false | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Components Documentation | ||
|
|
||
| This document describes the internal architecture, relationships, and usage of major UI components in the AlexJSully Portfolio project. Components are modular, reusable, and styled with Material-UI and Emotion. | ||
|
|
||
| ## 📦 Component List & Hierarchy | ||
|
|
||
| - [ProjectsGrid](./projects.md): Displays a grid of projects. | ||
| - [Publications](./publications.md): Lists publications. | ||
| - [Footer](./socials.md): Shows social media links. | ||
| - [Navbar](../architecture/index.md): Navigation bar (see architecture for layout details). | ||
| - [Banner, CookieSnackbar, StarsBackground]: Utility and visual components. | ||
|
|
||
| ### Component Hierarchy | ||
|
|
||
| ```mermaid | ||
| flowchart TD | ||
| App --> Navbar | ||
| App --> Banner | ||
| App --> ProjectsGrid | ||
| App --> Publications | ||
| App --> Footer | ||
| App --> CookieSnackbar | ||
| App --> StarsBackground | ||
| ``` | ||
|
|
||
| ## 🔍 Component Details | ||
|
|
||
| - **Navbar:** Top navigation bar, links to sections. Handles navigation, accessibility, and analytics logging. | ||
| - **Banner:** Header section, may include avatar and intro. Displays profile and branding. | ||
| - **ProjectsGrid:** Displays project cards in a grid. Handles filtering, analytics, and responsive layout. | ||
| - **Publications:** Lists publications with metadata. Supports links to external resources. | ||
| - **Footer:** Social media links and copyright. Includes contact and resume links. | ||
| - **CookieSnackbar:** Shows cookie consent. Manages cookie state and user interaction. | ||
| - **StarsBackground:** Visual background effect. Renders animated stars for visual appeal. | ||
|
|
||
| ## 🏗️ Relationships & Composition | ||
|
|
||
| - Components are composed in page layouts (see `GeneralLayout.tsx`). | ||
| - Data is passed via props or imported from `src/data/`. | ||
| - Styling is handled via MUI and Emotion. | ||
| - Utility components (Banner, CookieSnackbar, StarsBackground) are used for branding and user experience. | ||
|
|
||
| ## 🧩 How Components Work | ||
|
|
||
| Components are located in `src/components/` and are imported using TypeScript path aliases (see `tsconfig.json`). | ||
| Each component is tested with Jest and/or Cypress for reliability. | ||
|
|
||
| ## 🔗 Related Docs | ||
|
|
||
| - [Architecture Overview](../architecture/index.md) | ||
| - [Usage Guides](../usage/index.md) | ||
|
|
||
| --- | ||
|
|
||
| 💡 **Tip:** See each component's documentation for usage examples, diagrams, and integration details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # Projects Documentation | ||
|
|
||
| ## Overview | ||
|
|
||
| This document explains how the projects grid is displayed and how to add new projects to the codebase. | ||
|
|
||
| ## Projects Grid Display | ||
|
|
||
| The projects grid is displayed using the `ProjectsGrid` component located in [ProjectsGrid.tsx](../../src/components/projects/ProjectsGrid.tsx). This component creates a grid layout to showcase the projects. | ||
|
|
||
| ### Key Elements | ||
|
|
||
| - **State Management:** Uses React `useState` to toggle featured/all projects. | ||
| - **Grid Layout:** Responsive grid via MUI Grid/Stack. | ||
| - **Project Cards:** Thumbnail, name, title, employer, resource links. | ||
|
|
||
| ### Flowchart | ||
|
|
||
| ```mermaid | ||
| flowchart LR | ||
| A[ProjectsGrid Component] -->|Fetches| B[Projects Data] | ||
| B --> C[Maps Projects to Grid Items] | ||
| C --> D[Displays Project Cards] | ||
| D --> E[Project Thumbnail] | ||
| D --> F[Project Name] | ||
| D --> G[Project Title - Employer] | ||
| D --> I[Links] | ||
| E --> J[Thumbnail Image] | ||
| I --> K[Link Buttons] | ||
| D --> L[YouTube Video] | ||
| ``` | ||
|
|
||
| ```ts | ||
| { | ||
| name: 'Project Name', | ||
| title: 'Project Title', | ||
| employer: 'Employer', | ||
| thumbnail: 'image/path', | ||
| links: [{ type: 'github', url: '...' }], | ||
| // ...other fields | ||
| } | ||
| ``` | ||
|
|
||
| ```ts | ||
| { | ||
| name: 'Project Name', | ||
| title: 'Project Title', | ||
| employer: 'Employer', | ||
| thumbnail: 'image/path', | ||
| links: [{ type: 'github', url: '...' }], | ||
| // ...other fields | ||
| } | ||
| ``` | ||
|
|
||
| ## 🔗 Related Docs | ||
|
|
||
| - [Component Overview](./index.md) | ||
| - [System Architecture](../architecture/index.md) | ||
|
|
||
| ```json | ||
| { | ||
| "name": "Project Name", | ||
| "id": "project-id", // unique identifier for the project (associated with the image file name or publication) | ||
| "description": "Project description", // optional | ||
| "employer": "Employer Name", // optional | ||
| "employerURL": "https://employer-website.com", // required if employer is provided | ||
| "title": "Job Title", | ||
| "publication": "https://publication-url.com", // optional | ||
| "type": "Employment", // or 'Personal Project', 'School (MSc)', etc. | ||
| "url": "https://project-url.com", // optional | ||
| "urls": [ | ||
| // this is used to create a series of buttons with links | ||
| { | ||
| "text": "Link Text", | ||
| "tooltip": "Tooltip description", | ||
| "icon": "IconComponent", // this is a JSX component | ||
| "url": "https://link-url.com" | ||
| } | ||
| ], | ||
| "color": "#colorCode", | ||
| "dates": { | ||
| "startDate": "YYYY-MM", | ||
| "endDate": "YYYY-MM" // or current if ongoing | ||
| }, | ||
| "showcase": true, // or false | ||
| "objectFit": "contain", // optional, cover is used if nothing is provided | ||
| "youtubeURL": "https://www.youtube.com/embed/{videoID}?autoplay=1&mute=1&cc_load_policy=1&controls=1" // optional: displays a YouTube video to play in the card if mouse hovered over | ||
| } | ||
| ``` | ||
|
|
||
| ### Adding Thumbnail Images | ||
|
|
||
| To add a thumbnail image for the new project, place the image in the appropriate directory: | ||
|
|
||
| 1. **Navigate to the images directory**: Go to the [public image projects directory](../../public/images/projects). | ||
| 2. **Create a new directory**: Create a new directory with the project ID (e.g., `new-project`). | ||
| 3. **Add the thumbnail image**: Place the thumbnail image in the new directory and name it `thumbnail.webp`. Recommended to use `.webp` format for better performance. | ||
|
|
||
| By following these steps, you can successfully add new projects to the projects grid. | ||
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # Configs Module Documentation | ||
|
|
||
| This document describes configuration files and environment setup in AlexJSully's Portfolio project, their roles, technical details, and how to update or extend them. | ||
|
|
||
| ## 📦 Purpose | ||
|
|
||
| Configs manage environment variables, service integrations, and global settings for the app. They enable features like Firebase, Sentry error tracking, and custom runtime options. | ||
|
|
||
| ## 🏗️ Structure | ||
|
|
||
| - **Location:** `src/configs/` | ||
| - **Example files:** | ||
| - `firebase.ts`: Firebase configuration and initialization | ||
| - `firebase.test.ts`: Test configuration for Firebase | ||
| - **Related config files:** | ||
| - `.env`: Environment variables (API keys, secrets) | ||
| - `next.config.js`: Next.js build/runtime config | ||
| - `sentry.client.config.ts`, `sentry.server.config.ts`, `sentry.edge.config.ts`: Sentry error tracking | ||
|
|
||
| ## 🔍 Usage Examples | ||
|
|
||
| ### Importing Firebase Config | ||
|
|
||
| ```ts | ||
| import firebaseConfig from '@configs/firebase'; | ||
|
|
||
| // Initialize Firebase app | ||
| ``` | ||
|
|
||
| ### Using Environment Variables | ||
|
|
||
| ```ts | ||
| const apiKey = process.env.NEXT_PUBLIC_API_KEY; | ||
| ``` | ||
|
|
||
| ### Sentry Configuration | ||
|
|
||
| ```ts | ||
| import * as Sentry from '@sentry/nextjs'; | ||
|
|
||
| Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN }); | ||
| ``` | ||
|
|
||
| ### Next.js Config Example | ||
|
|
||
| ```js | ||
| // next.config.js | ||
| module.exports = { | ||
| reactStrictMode: true, | ||
| env: { | ||
| NEXT_PUBLIC_API_KEY: process.env.NEXT_PUBLIC_API_KEY, | ||
| }, | ||
| }; | ||
| ``` | ||
|
|
||
| ## 🧩 Integration & Relationships | ||
|
|
||
| - Configs are imported by components, helpers, and backend logic for environment-specific behavior. | ||
| - Environment variables are loaded via `.env` and referenced in code using `process.env.*`. | ||
| - Sentry config files enable error tracking for client, server, and edge runtimes. | ||
|
|
||
| ## 🛠️ Extending Configs | ||
|
|
||
| - Add new config files in `src/configs/` for new services. | ||
| - Update `.env` for new environment variables. | ||
| - Document config changes in `README.md` and relevant docs. | ||
|
|
||
| ## 🔗 Related Docs | ||
|
|
||
| - [System Architecture](./index.md) | ||
|
|
||
| - [PWA Documentation](./pwa.md) | ||
|
|
||
| 💡 **Tip:** Keep sensitive keys in `.env` and never commit them to version control. Document all config changes for maintainability. | ||
|
|
||
| ## 🛠️ Practical Guidance | ||
|
|
||
| - Store sensitive keys and secrets in `.env` (never commit to git). | ||
| - Document required environment variables for contributors in README.md or a dedicated section. | ||
| - Update config files when adding new services or changing integrations. | ||
| - Validate config changes with `npm run validate`. | ||
| - For Sentry, update DSN and environment in all sentry config files and test error reporting. | ||
|
|
||
| ## 🧩 Relationships | ||
|
|
||
| - Used by data modules, components, and Next.js for service integration. | ||
| - Sentry configs for error tracking. | ||
| - Firebase config for backend/data features. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.