Skip to content

Commit

Permalink
Supabase Project configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Milanshub committed Dec 3, 2024
1 parent f4d7e6c commit d5f89f1
Show file tree
Hide file tree
Showing 81 changed files with 11,649 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
58 changes: 58 additions & 0 deletions docs/architecture/design-patterns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Design Patterns Implementation

This document outlines the key design patterns used in our portfolio project, including their implementation details and rationale.

## Core Design Patterns Used

### 1. Repository Pattern
- **Where**: Data access layer for Projects, Profile, and Messages
- **Why**: Abstracts database operations, making it easier to switch databases or add caching
- **Implementation**:

### 2. Factory Pattern
- **Where**: Creating Project and Technology instances
- **Why**: Standardizes object creation, especially for different project types
- **Implementation**:

### 3. Observer Pattern
- **Where**: Analytics tracking and project updates
- **Why**: Enables real-time updates and loose coupling between components
- **Implementation**:

### 4. Singleton Pattern
- **Where**: Database connection, Authentication service
- **Why**: Ensures single instance for critical services
- **Implementation**:

### 5. Strategy Pattern
- **Where**: Image upload handling
- **Why**: Allows switching between different storage solutions
- **Implementation**:

### 7. Command Pattern
- **Where**: Project actions (create, update, delete)
- **Why**: Encapsulates requests as objects
- **Implementation**:

## Additional Patterns

### 6. Decorator Pattern
- **Where**: Authentication and logging middleware
- **Why**: Adds functionality to existing objects dynamically
- **Implementation**:

## Usage Guidelines

1. Always use the Repository Pattern for data access
2. Implement Factory Pattern for creating complex objects
3. Use Observer Pattern for loose coupling in event-driven scenarios
4. Implement Strategy Pattern when multiple algorithms might be used
5. Use Singleton Pattern sparingly and only for true global state

## Benefits

- Maintainable and scalable code structure
- Easier testing through dependency injection
- Flexible architecture that can adapt to changing requirements
- Clear separation of concerns

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Site Navigation
```mermaid
%%{init: {
'theme': 'dark',
'themeVariables': {
'fontSize': '24px',
'fontFamily': 'monospace'
},
'flowchart': {
'diagramPadding': 100,
'nodeSpacing': 100,
'rankSpacing': 100,
'curve': 'basis'
},
'height': 1000,
'width': 2000
}}%%
flowchart TD
subgraph Public["Public Routes"]
A[Landing Page] --> B[Projects Gallery]
Expand Down Expand Up @@ -43,4 +58,5 @@ flowchart TD
style A fill:#f9f,stroke:#333,stroke-width:2px
style L fill:#bbf,stroke:#333,stroke-width:2px
style M fill:#dfd,stroke:#333,stroke-width:2px
style M fill:#dfd,stroke:#333,stroke-width:2px
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
/.env
*.env
.env.*
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
File renamed without changes.
Loading

0 comments on commit d5f89f1

Please sign in to comment.