Skip to content

Commit

Permalink
refactor: enhancing frontend with TypeScript, Redux, and custom hooks…
Browse files Browse the repository at this point in the history
…; improving asset management

- Refactoring the frontend by adding TypeScript for type safety and maintainability.
- Integrating Redux for state management.
- Documenting components for better clarity and collaboration.
- Moving component logic into custom hooks to improve reusability and maintainability.
- Transferring sound assets to Amazon S3 for efficient storage.
- Creating API endpoints for sound assets and integrating them with the frontend.
  • Loading branch information
Dedakup committed Nov 27, 2024
1 parent 9eed76c commit 2be8ac5
Show file tree
Hide file tree
Showing 166 changed files with 22,665 additions and 13,055 deletions.
39 changes: 37 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,50 @@
# Node.js
node_modules/

# Environment files
.env
.env.local
.env.*.local
VITE_.env

# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Build
# Build directories
dist/
build/
.serverless/

# React
# Frontend-specific
.cache/
.vite/
coverage/

# Backend-specific
src/**/*.d.ts # Ignore autogenerated TypeScript declarations
*.db # Ignore local SQLite database files
tmp/

# OS-specific
.DS_Store
Thumbs.db

# IDE-specific
.idea/
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Compiled binary addons
build/Release

# Optional npm cache directory
.npm
5 changes: 5 additions & 0 deletions .husky/_/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"

# Add the linting commands directly
npm run lint --prefix frontend && npm run lint --prefix backend
3 changes: 3 additions & 0 deletions .husky/_/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
npm run test --prefix frontend && npm run test --prefix backend
18 changes: 0 additions & 18 deletions .serverless/meta.json

This file was deleted.

10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"dbaeumer.vscode-eslint", // ESLint for linting JavaScript/TypeScript
"esbenp.prettier-vscode", // Prettier for code formatting
"eamodio.gitlens", // GitLens for enhanced Git support
"ms-vscode.vscode-typescript-next", // TypeScript support for newer features
"streetsidesoftware.code-spell-checker", // Spell checker for typos
"ms-playwright.playwright" // Playwright for E2E testing
]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode", // Use Prettier as the default formatter
"editor.tabSize": 2, // Enforce 2-space indentation
"files.exclude": {
"dist/": true,
"node_modules/": true,
".serverless/": true
},
"eslint.alwaysShowStatus": true, // Show ESLint status in the bottom bar
"typescript.tsserver.log": "verbose", // Useful for debugging TypeScript issues
"gitlens.hovers.enabled": true, // Enable GitLens hover features
"extensions.required": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
19 changes: 19 additions & 0 deletions backend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Ignore node modules
node_modules/

# Ignore build artifacts
dist/
.serverless/

# Ignore environment files
.env
.env.example

# Ignore config files
jest.config.js
tsconfig.json
.eslintrc.js

# Ignore specific folders
coverage/ # If using Jest for coverage reports
logs/
12 changes: 12 additions & 0 deletions backend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"env": {
"node": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"prettier/prettier": "error"
}
}
53 changes: 20 additions & 33 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,45 +1,32 @@
# Logs
logs
logs/
*.log
npm-debug.log*

# Visual Studio Code
.vscode
# Node.js
node_modules/

tmp

# Runtime data
pids
# Temporary files
tmp/
pids/
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Build
dist/
build/
.serverless/

# Dependency directory
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules
# Coverage
coverage/
lib-cov/

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# project files that contain sensitive data
# Sensitive files
.env
event.json
policyDocument.json
*.zip

# Compiled binary addons
build/Release

# IDE-specific
.vscode/
18 changes: 18 additions & 0 deletions backend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Ignore node modules
node_modules/

# Ignore build artifacts
dist/
.serverless/

# Ignore environment files
.env
.env.example

# Ignore package lock and yarn lock files
package-lock.json
yarn.lock

# Ignore other specific files or folders
coverage/ # If using Jest for coverage reports
logs/
11 changes: 11 additions & 0 deletions backend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 4,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"quoteProps": "as-needed"
}
12 changes: 12 additions & 0 deletions backend/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
"^.+.tsx?$": ["ts-jest",{}],
},
moduleNameMapper: {
'^@utils/(.*)$': '<rootDir>/src/utils/$1',
'^@handlers/(.*)$': '<rootDir>/src/handlers/$1',
},
};
Loading

0 comments on commit 2be8ac5

Please sign in to comment.