From 740631d376e261bceecce04670a600b0a5e60606 Mon Sep 17 00:00:00 2001 From: Kailasdevdas Date: Thu, 16 Apr 2026 19:50:11 +0530 Subject: [PATCH] docs: update readme --- backend/README.md | 59 ++++++++++++++++++++++++++++ frontend/README.md | 98 +++++++++++++++++----------------------------- 2 files changed, 95 insertions(+), 62 deletions(-) create mode 100644 backend/README.md diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 0000000..b7eec55 --- /dev/null +++ b/backend/README.md @@ -0,0 +1,59 @@ +**GG-Node-Backend** + +## Tech Stack + +Runtime: Node.js (ES Modules) +Framework: Express.js (v5.x) +ORM: Prisma (PostgreSQL) +Storage: Bytescale (Image uploads) +Auth: JSON Web Tokens (JWT) & Bcrypt +Email: Postmark + +## Project Structure + +backend/ +├── prisma/ +│ └── schema.prisma +├──── src/ +│ ├── app.js +│ ├── controllers/ +│ ├── middlewares/ +│ ├── routes/ +│ ├── prisma/ +│ └── utils/ +├── .env +└── package.json + +## Installation & Setup + +**1. Prerequisites** +Node.js (v18+) +PostgreSQL Database + +**2. Environment Variables** +DATABASE_URL="" +PORT=3000 +JWT_SECRET="" +CORS_ALLOWED_ORIGINS=http://localhost:3001 http://localhost:3003 http://localhost:5174 http://localhost:5173 +BYTESCALE_SECRET_API_KEY="" +POSTMARK_API_KEY="" + +**3. Install Dependencies** +npm install + +**4. Database Initialization** + +# Generate Prisma Client + +npm run generate + +# Run migrations to create database tables + +npm run migrate + +## Scripts + +1. npm start: Runs the server in production mode. +2. npm run migrate: Syncs your local database with the current Prisma schema. +3. npm run generate: Regenerates the Prisma Client (run this after schema changes). +4. npx prisma studio: Opens a visual editor to view and manage your database data. diff --git a/frontend/README.md b/frontend/README.md index d2e7761..e65504e 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,73 +1,47 @@ -# React + TypeScript + Vite +**GG-Dashboard** -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +## Tech Stack -Currently, two official plugins are available: +Framework: React 19 +Build Tool: Vite + TypeScript +Styling: Tailwind CSS 4 + shadcn/ui +Rich Text: Editor.js +State/Fetch: Axios + React Hooks +Export: XLSX + File-saver -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +## Project Structure -## React Compiler +frontend/ +├── src/ +│ ├── api/ +│ ├── assets/ +│ ├── components/ +│ ├── context/ +│ ├── lib/ +│ ├── layout/ +│ ├── pages/ +│ ├── services/ +│ ├── utils/ +│ └── App.tsx +├── .env +├── index.html +└── package.json -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). +## Installation & Setup -## Expanding the ESLint configuration +**1. Prerequisites** +Node.js (v20+) -If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: +**2. Environment Variables** +VITE_API_URL="http://localhost:3000/api" -```js -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... +**3. Install Dependencies** +npm install - // Remove tseslint.configs.recommended and replace with this - tseslint.configs.recommendedTypeChecked, - // Alternatively, use this for stricter rules - tseslint.configs.strictTypeChecked, - // Optionally, add this for stylistic rules - tseslint.configs.stylisticTypeChecked, +**4. Development** +npm run dev - // Other configs... - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` +## Scripts -You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: - -```js -// eslint.config.js -import reactX from 'eslint-plugin-react-x' -import reactDom from 'eslint-plugin-react-dom' - -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - // Enable lint rules for React - reactX.configs['recommended-typescript'], - // Enable lint rules for React DOM - reactDom.configs.recommended, - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` +npm run dev: Starts the Vite development server with Hot Module Replacement. +npm run build: Compiles TypeScript and builds the production-ready assets.