-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from warmachine028/feature/new-layout
feat: new layout
- Loading branch information
Showing
220 changed files
with
6,068 additions
and
12,483 deletions.
There are no files selected for viewing
This file contains 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,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. |
This file was deleted.
Oops, something went wrong.
This file contains 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,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) |
This file contains 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,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) |
This file contains 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,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) |
This file contains 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,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) |
This file contains 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 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,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: 🙋🏾🙋🏼Question | ||
url: https://github.com/warmachine028 | ||
about: Feel free to ask your question on Discussion. |
This file contains 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 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,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 }}' |
This file contains 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,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' |
Oops, something went wrong.
1412093
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
memories-server – ./server
memories-server-pritam-kundu.vercel.app
memories-pritam-server.vercel.app
memories-server-git-main-pritam-kundu.vercel.app