Skip to content

Commit

Permalink
Merge pull request #180 from warmachine028/feature/new-layout
Browse files Browse the repository at this point in the history
feat: new layout
  • Loading branch information
warmachine028 authored Oct 28, 2024
2 parents 53c7d48 + a7d0b23 commit 1412093
Show file tree
Hide file tree
Showing 220 changed files with 6,068 additions and 12,483 deletions.
75 changes: 75 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
You are an expert in React, JavaScript, Vite, Material UI, Clerk Auth, React Router, Zustand, Tanstack React Query, axios, moment, Tabler icons, MUI icons, Vercel, Express.js, Node.js, Cloudinary, Prisma, and Neon PostgreSQL.

Key Principles
- Write concise, technical responses with accurate JavaScript examples.
- Use functional, declarative programming. Avoid classes.
- Prefer iteration and modularization over duplication.
- Use descriptive variable names with auxiliary verbs (e.g., isLoading).
- Use lowercase with dashes for directories (e.g., components/auth-modal).
- Favor named exports for components.
- Use the Receive an Object, Return an Object (RORO) pattern.

JavaScript
- Use "function" keyword for pure functions. Use semicolons.
- File structure: Exported component, subcomponents, helpers, static content.
- Avoid unnecessary curly braces in conditional statements.
- For single-line statements in conditionals, omit curly braces.

Error Handling and Validation
- Prioritize error handling and edge cases:
- Handle errors and edge cases at the beginning of functions.
- Use early returns for error conditions to avoid deeply nested if statements.
- Place the happy path last in the function for improved readability.
- Avoid unnecessary else statements; use if-return pattern instead.
- Use guard clauses to handle preconditions and invalid states early.
- Implement proper error logging and user-friendly error messages.
- Consider using custom error types or error factories for consistent error handling.

React/Vite
- Use functional components.
- Use declarative JSX.
- Use const, not function, for components.
- Use Material UI for components and styling.
- Implement responsive design with Material UI's responsive utilities.
- Use mobile-first approach for responsive design.
- Place static content at file end.
- Use content variables for static content outside render functions.
- Use Clerk for authentication and user management.
- Use axios for API requests.
- Use React Router for navigation.
- Use Zustand for state management.
- Utilize Tanstack React Query for data fetching and caching.
- Use moment for date and time manipulation.
- Use Tabler icons and MUI icons for iconography.
- Deploy frontend to Vercel.

Backend (Express.js/Node.js)
- Use Express.js for routing and middleware.
- Implement RESTful API design principles.
- Use Prisma as the ORM for database operations.
- Implement proper error handling middleware.
- Use environment variables for configuration.
- Implement input validation and sanitization.
- Use async/await for asynchronous operations.
- Use Clerk for user authorization on the backend.
- Integrate Cloudinary for image and file management.

Database (Neon PostgreSQL)
- Design schemas with proper data types and constraints.
- Use indexes for frequently queried fields.
- Implement data pagination for large datasets.
- Use Prisma migrations for database schema management.

Key Conventions
1. Use Vite for fast development and optimized builds.
2. Prioritize Web Vitals (LCP, CLS, FID).
3. Implement efficient data fetching and caching strategies with RTK Query.
4. Use proper security measures (e.g., CORS, helmet for Express).
5. Utilize Prisma's type-safe database access.
6. Implement proper state management with Zustand.
7. Use React Router for declarative routing.
8. Leverage Clerk's authentication and user management features.
9. Optimize image delivery with Cloudinary.
10. Utilize Neon PostgreSQL's scalability and performance features.

Refer to the documentation of each technology for best practices and up-to-date information.
28 changes: 0 additions & 28 deletions .deepsource.toml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/1-feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 💡 General Feature Request
description: Have a new idea/feature for memories? Please suggest!
labels: ['⭐ goal: addition', 'good first issue', '🤩 Up for the grab', 'help wanted', 'enhancement']
title: '[FEATURE 💡] <description>'
body:
- type: textarea
id: description
attributes:
label: Description
description: A brief description of the enhancement you propose, also include what you tried and what worked.
placeholder: Enter your description
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Screenshots to support proposal of feature or idea
placeholder: Please attach screenshots if applicable
validations:
required: false
- type: textarea
id: extrainfo
attributes:
label: Additional information
description: Is there anything else we should know about this idea?
value: |
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and docs before proceeding**
## Happy contributing. 💐
Star my other Repositories [here](https://github.com/warmachine028)
validations:
required: false
- type: markdown
attributes:
value: |
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and docs before proceeding**
## Happy contributing. 💐
Star my other Repositories [here](https://github.com/warmachine028?tab=repositories)
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/2-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 🐛 Bug Bounty Hunter
description: Report an bug in memories and help improve the project!
labels: ['🛠 goal: fix', 'good first issue', '🤩 Up for the grab', 'help wanted', 'enhancement', 'bug']
title: '[BUG 🐞] <description>'
body:
- type: textarea
id: description
attributes:
label: Description
description: A brief description of the question or issue, also include what you tried and what didn't work
placeholder: Enter your description
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Screenshots to support replication of Bug
placeholder: Please attach screenshots if applicable
validations:
required: false
- type: textarea
id: extrainfo
attributes:
label: Additional information
description: Is there anything else we should know about this idea?
value: |
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and docs before proceeding**
## Happy contributing. 💐
Star my other Repositories [here](https://github.com/warmachine028)
validations:
required: false
- type: markdown
attributes:
value: |
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and docs before proceeding**
## Happy contributing. 💐
Star my other Repositories [here](https://github.com/warmachine028?tab=repositories)
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/3-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 📄 Documentation issue
description: Found an issue in the documentation? You can use this one!
title: '[DOCS 📄] <description>'
labels: ['📄 aspect: text', 'good first issue', '🤩 Up for the grab']
body:
- type: textarea
id: description
attributes:
label: Description
description: A brief description of the question or issue, also include what you tried and what didn't work
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Please add screenshots if applicable
validations:
required: false
- type: textarea
id: extrainfo
attributes:
label: Additional information
description: Is there anything else we should know about this issue?
validations:
required: false
- type: markdown
attributes:
value: |
Star my other Repositories [here](https://github.com/warmachine028)
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/4-other.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Other
description: Use this for any other issues. Please do NOT create blank issues
title: '[OTHER]'
labels: ['🚦 status: awaiting triage']
body:
- type: markdown
attributes:
value: '# Other issue'
- type: textarea
id: issuedescription
attributes:
label: What would you like to share?
description: Provide a clear and concise explanation of your issue.
validations:
required: true
- type: textarea
id: extrainfo
attributes:
label: Additional information
description: Is there anything else we should know about this issue?
validations:
required: false
- type: markdown
attributes:
value: |
Star my other Repositories [here](https://github.com/warmachine028)
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ body:
description: Is there anything else we should know about this idea?
value: |
- Always use styled components instead of plain CSS and MUI components.
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and [SETUP](https://github.com/warmachine028/memories/tree/main/rules) docs before proceeding**
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and docs before proceeding**
## Happy contributing. 💐
Star my other Repositories [here](https://github.com/warmachine028)
validations:
required: false
- type: markdown
attributes:
value: |
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and [SETUP](https://github.com/warmachine028/memories/tree/main/rules) docs before proceeding**
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and docs before proceeding**
## Happy contributing. 💐
Star my other Repositories [here](https://github.com/warmachine028?tab=repositories)
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 🙋🏾🙋🏼‍Question
url: https://github.com/warmachine028
about: Feel free to ask your question on Discussion.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ body:
description: Is there anything else we should know about this idea?
value: |
- Always use styled components instead of plain CSS and MUI components.
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and [SETUP](https://github.com/warmachine028/memories/tree/main/rules) docs before proceeding**
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and docs before proceeding**
## Happy contributing. 💐
Star my other Repositories [here](https://github.com/warmachine028)
validations:
required: false
- type: markdown
attributes:
value: |
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and [SETUP](https://github.com/warmachine028/memories/tree/main/rules) docs before proceeding**
## **Make sure to read the [CONTRIBUTING](https://github.com/warmachine028/memories/blob/main/CONTRIBUTING.md) and docs before proceeding**
## Happy contributing. 💐
Star my other Repositories [here](https://github.com/warmachine028?tab=repositories)
23 changes: 23 additions & 0 deletions .github/actions/push-changes/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Push changes
description: A reusable action to push changes with a specified commit message and file paths
inputs:
message:
description: Commit message
required: true
paths:
description: File paths to add
default: '.'
runs:
using: composite
steps:
- name: Pull changes
run: git pull
shell: bash

- name: Push changes
uses: EndBug/add-and-commit@v9
with:
committer_name: 'GitHub Actions'
committer_email: '[email protected]'
add: ${{ inputs.paths }}
message: '${{ inputs.message }}'
32 changes: 17 additions & 15 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: ".github"
schedule:
interval: daily
time: "21:00"
- package-ecosystem: npm
directory: "client"
schedule:
interval: daily
time: "21:00"
- package-ecosystem: npm
directory: "server"
schedule:
interval: daily
time: "21:00"
- package-ecosystem: github-actions #! for github-actions
directory: '.github'
schedule:
interval: daily
time: '21:00'
- package-ecosystem: npm #! enable for javascript & typescript
open-pull-requests-limit: 10
directory: 'client'
schedule:
interval: daily
time: '21:00'
- package-ecosystem: npm #! enable for javascript & typescript
open-pull-requests-limit: 10
directory: 'server'
schedule:
interval: daily
time: '21:00'
Loading

1 comment on commit 1412093

@vercel
Copy link

@vercel vercel bot commented on 1412093 Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.