{"id":48802467,"url":"https://github.com/shahadot786/fullstack-master-repo","last_synced_at":"2026-04-14T03:33:30.877Z","repository":{"id":327959971,"uuid":"1113754627","full_name":"shahadot786/fullstack-master-repo","owner":"shahadot786","description":"A unified full-stack workspace containing multiple backend services, web applications, and mobile apps inside a single architecture. Designed for hands-on learning, scalable project structure, and mastering end-to-end development with API-driven design.","archived":false,"fork":false,"pushed_at":"2026-01-18T15:49:45.000Z","size":13433,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-18T23:52:59.792Z","etag":null,"topics":["api-first","backend-services","expressjs","fullstack","fullstack-development","fullstack-project","javascript","learning-project","microservices-architecture","mobile-app","monolithic-repo","nodejs","portfolio-project","react","react-native","software-architecture","software-architecture-and-design","system-design","typescript","web-application"],"latest_commit_sha":null,"homepage":"https://nexus-web-portal-demo.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shahadot786.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-10T12:20:53.000Z","updated_at":"2026-01-18T15:49:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shahadot786/fullstack-master-repo","commit_stats":null,"previous_names":["shahadot786/fullstack-master-repo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shahadot786/fullstack-master-repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadot786%2Ffullstack-master-repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadot786%2Ffullstack-master-repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadot786%2Ffullstack-master-repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadot786%2Ffullstack-master-repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shahadot786","download_url":"https://codeload.github.com/shahadot786/fullstack-master-repo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadot786%2Ffullstack-master-repo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31781292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-first","backend-services","expressjs","fullstack","fullstack-development","fullstack-project","javascript","learning-project","microservices-architecture","mobile-app","monolithic-repo","nodejs","portfolio-project","react","react-native","software-architecture","software-architecture-and-design","system-design","typescript","web-application"],"created_at":"2026-04-14T03:33:30.817Z","updated_at":"2026-04-14T03:33:30.865Z","avatar_url":"https://github.com/shahadot786.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexus Fullstack Monorepo\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)\n[![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)\n[![Next.js](https://img.shields.io/badge/Next.js-16-black.svg)](https://nextjs.org/)\n[![React Native](https://img.shields.io/badge/React%20Native-0.81-61dafb.svg)](https://reactnative.dev/)\n[![Expo](https://img.shields.io/badge/Expo-54-000020.svg)](https://expo.dev/)\n[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nA production-ready, type-safe fullstack monorepo template featuring **Backend (Node.js/Express/MongoDB)**, **Web (Next.js)**, and **Mobile (React Native/Expo)** applications. Built with TypeScript, featuring complete authentication flows, real-time capabilities, and shared type safety across all platforms.\n\n**Perfect for**: Learning fullstack development, starting new projects, or as a reference implementation for modern MERN stack applications.\n\n---\n\n## 📸 Screenshots\n\n### Web Application\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view screenshots\u003c/summary\u003e\n\n#### Registration Page\n![Registration](./docs/images/web-register.png)\n\n#### Todo Dashboard (Dark Mode)\n![Todo Dashboard](./docs/images/web-todo-dashboard.png)\n\n#### Create Todo Dialog\n![Create Todo](./docs/images/web-todo-create.png)\n\n\u003c/details\u003e\n\n### Mobile Application\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view screenshots\u003c/summary\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003ctd width=\"50%\"\u003e\n        \u003ch4 align=\"center\"\u003eLogin Screen\u003c/h4\u003e\n        \u003ca href=\"./docs/images/mobile-login.png\"\u003e\n          \u003cimg src=\"./docs/images/mobile-login.png\" width=\"100%\" style=\"max-height: 400px; object-fit: contain;\" alt=\"Login Screen\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd width=\"50%\"\u003e\n        \u003ch4 align=\"center\"\u003eNavigation Drawer\u003c/h4\u003e\n        \u003ca href=\"./docs/images/mobile-drawer.png\"\u003e\n          \u003cimg src=\"./docs/images/mobile-drawer.png\" width=\"100%\" style=\"max-height: 400px; object-fit: contain;\" alt=\"Navigation Drawer\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd width=\"50%\"\u003e\n        \u003ch4 align=\"center\"\u003eTodo List (Light Mode)\u003c/h4\u003e\n        \u003ca href=\"./docs/images/mobile-todos-light.png\"\u003e\n          \u003cimg src=\"./docs/images/mobile-todos-light.png\" width=\"100%\" style=\"max-height: 400px; object-fit: contain;\" alt=\"Todo List Light\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd width=\"50%\"\u003e\n        \u003ch4 align=\"center\"\u003eTodo List (Dark Mode)\u003c/h4\u003e\n        \u003ca href=\"./docs/images/mobile-todos-dark.png\"\u003e\n          \u003cimg src=\"./docs/images/mobile-todos-dark.png\" width=\"100%\" style=\"max-height: 400px; object-fit: contain;\" alt=\"Todo List Dark\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd width=\"50%\"\u003e\n        \u003ch4 align=\"center\"\u003eCreate Todo Modal\u003c/h4\u003e\n        \u003ca href=\"./docs/images/mobile-create-todo.png\"\u003e\n          \u003cimg src=\"./docs/images/mobile-create-todo.png\" width=\"100%\" style=\"max-height: 400px; object-fit: contain;\" alt=\"Create Todo\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd width=\"50%\"\u003e\n        \u003ch4 align=\"center\"\u003eSettings \u0026 Profile\u003c/h4\u003e\n        \u003ca href=\"./docs/images/mobile-settings.png\"\u003e\n          \u003cimg src=\"./docs/images/mobile-settings.png\" width=\"100%\" style=\"max-height: 400px; object-fit: contain;\" alt=\"Settings\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\n\u003c/details\u003e\n\n---\n\n## 📋 Table of Contents\n\n- [Features](#-features)\n- [Project Status](#-project-status)\n- [Project Structure](#-project-structure)\n- [Quick Start](#-quick-start)\n- [Environment Variables](#-environment-variables)\n- [Available Scripts](#-available-scripts)\n- [Authentication](#-authentication)\n- [API Endpoints](#-api-endpoints)\n- [Documentation](#-documentation)\n- [Tech Stack](#️-tech-stack)\n- [Deployment](#-deployment)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n---\n\n## 🚀 Features\n\n### Backend (Node.js/Express)\n\n#### ✅ Production-Ready Features\n- **TypeScript** - Full type safety with path aliases (`@common`, `@services`, etc.)\n- **Authentication Service** - Complete JWT-based auth system\n  - User registration with email verification (6-digit OTP)\n  - Login with access tokens (15min) and refresh tokens (7 days)\n  - Password reset flow with OTP\n  - Token refresh and rotation\n  - Protected routes with middleware\n- **TODO Service** - Full CRUD example with user scoping\n- **Expense Tracker** - Comprehensive expense management with custom categories and analytics\n- **Chat Service** - Real-time private and group messaging with Socket.IO\n- **Shoutbox** - Global real-time chat for all authenticated users\n- **Weather Service** - Multi-provider weather data (OpenWeather, WeatherAPI) with rate limiting\n- **URL Shortener** - URL management with short ID generation and click tracking\n- **Analytics Service** - Global and user-specific statistics for various services\n- **Upload Service** - Cloudinary integration for profile and group image management\n- **Redis Caching** - Upstash Redis integration with TLS support\n- **WebSocket** - Real-time notifications and messaging with Socket.IO\n- **Validation** - Zod schemas for request validation\n- **API Documentation** - Swagger/OpenAPI at `/api-docs`\n- **Testing** - Jest + Supertest E2E tests with 80%+ coverage\n- **Security** - Helmet, CORS, rate limiting, bcrypt password hashing\n- **Email Service** - Resend and Nodemailer integration for OTP and system emails\n\n#### 🚧 Placeholder Services (Ready for Implementation)\nThe monorepo includes placeholder service directories for remaining features:\n- `aiqa` - AI/QA service\n- `delivery` - Delivery tracking\n- `notes` - Note-taking\n- `shop` - E-commerce\n- `social` - Social features\n\n\u003e See [Creating New Service Guide](./docs/CREATING_NEW_SERVICE.md) to implement these services.\n\n### Shared Package\n\n- **Types** - Shared TypeScript interfaces across all apps\n- **Validation** - Reusable Zod schemas for consistent validation\n- **Constants** - API endpoints, error messages, HTTP status codes\n- **Utils** - Common helper functions\n\n### Web Application (Next.js)\n\n- **Next.js 16** - Latest App Router with React 19\n- **Modern UI** - TailwindCSS 4 with Radix UI primitives\n- **Authentication Pages** - Login, register, email verification, password reset\n- **Dashboard Layout** - Responsive sidebar navigation with theme toggle\n- **Feature Modules** - 11 feature pages matching backend services\n  - Todos (fully functional)\n  - Chat \u0026 Shoutbox (real-time messaging)\n  - Expense Tracker (categories, analytics)\n  - Weather (live updates)\n  - URL Shortener (management dashboard)\n  - Analytics (visualized stats)\n  - Profile (management, image uploads)\n  - Placeholder pages for remaining services (aiqa, delivery, notes, shop, social)\n- **State Management** - Zustand stores with React Query for server state\n- **Form Handling** - React Hook Form with Zod validation\n- **Real-time Updates** - Socket.IO client integration\n- **Theme Support** - Dark/light mode with next-themes\n- **Type Safety** - Full TypeScript with shared types from monorepo\n\n### Mobile Application (React Native/Expo)\n\n- **Expo SDK 54** - Latest Expo with React Native 0.81\n- **Navigation** - Expo Router with file-based routing\n- **Complete Auth Flow** - All authentication screens\n  - Login, Register, Email Verification\n  - Forgot Password, Reset Password\n  - Persistent sessions with MMKV storage\n- **Feature Modules** - Complete feature set matching parity\n  - TODO Management - Full CRUD with optimistic updates\n  - Chat \u0026 Shoutbox - Real-time private/group messaging\n  - Expense Management - Track daily expenses and categories\n  - Weather Dashboard - Live weather data\n  - URL Shortener - Mobile-native URL management\n  - Analytics - User and service statistics\n  - Profile management (Change Email, Password, Profile Image)\n\n---\n\n## 📊 Project Status\n\n### Fully Implemented ✅\n- **Backend**: Auth, Todo, Expense, Chat, Shoutbox, Weather, URL, Analytics, Upload\n- **Web**: Auth, Dashboard, Todos, Chat, Expense, Weather, URL Shortener, Analytics, Profile\n- **Mobile**: Auth, Todos, Chat, Expense, Weather, URL Shortener, Analytics, Profile Edit\n- **Shared**: Types, validation schemas, constants, utilities\n\n### Ready for Implementation 🚧\n- 9 backend service placeholders with corresponding web/mobile pages\n- Additional features: notifications, file uploads, search, analytics\n\n### Documentation 📚\n- ✅ Advanced authentication guide\n- ✅ Service creation tutorial\n- ✅ Deployment guide\n- ✅ Architecture documentation\n- ✅ Project structure guide\n\n---\n\n## 📁 Project Structure\n\n```\nfullstack-master-repo/\n├── backend/                    # Node.js/Express API\n│   ├── src/\n│   │   ├── common/             # Shared utilities\n│   │   │   ├── db/             # Database connection\n│   │   │   ├── errors/         # Custom error classes\n│   │   │   ├── services/       # Common services (email, redis, websocket)\n│   │   │   └── utils/          # Helper functions\n│   │   ├── config/             # Configuration\n│   │   │   ├── index.ts        # Environment config\n│   │   │   └── swagger.ts      # API documentation config\n│   │   ├── middleware/         # Express middleware\n│   │   │   ├── auth.middleware.ts\n│   │   │   ├── error.middleware.ts\n│   │   │   └── validation.middleware.ts\n│   │   └── services/           # Business logic by service\n│   │       ├── auth/           # ✅ Authentication (IMPLEMENTED)\n│   │       ├── todo/           # ✅ TODO CRUD (IMPLEMENTED)\n│   │       ├── aiqa/           # 🚧 Placeholder\n│   │       ├── chat/           # 🚧 Placeholder\n│   │       ├── delivery/       # 🚧 Placeholder\n│   │       ├── expense/        # 🚧 Placeholder\n│   │       ├── notes/          # 🚧 Placeholder\n│   │       ├── shop/           # 🚧 Placeholder\n│   │       ├── social/         # 🚧 Placeholder\n│   │       ├── urlshort/       # 🚧 Placeholder\n│   │       └── weather/        # 🚧 Placeholder\n│   ├── __tests__/              # Test files\n│   ├── app.ts                  # Express app setup\n│   ├── server.ts               # Server entry point\n│   └── package.json\n│\n├── shared/                     # Shared types \u0026 validation\n│   ├── src/\n│   │   ├── types/              # TypeScript interfaces\n│   │   ├── validation/         # Zod schemas\n│   │   ├── constants/          # Shared constants\n│   │   └── utils/              # Helper functions\n│   └── package.json\n│\n├── web/                        # Next.js application\n│   ├── app/\n│   │   ├── (auth)/             # Auth pages (login, register, verify, reset)\n│   │   ├── (dashboard)/        # Dashboard with sidebar\n│   │   │   ├── todos/          # ✅ TODO management (IMPLEMENTED)\n│   │   │   ├── profile/        # ✅ User profile (IMPLEMENTED)\n│   │   │   ├── aiqa/           # 🚧 Placeholder page\n│   │   │   ├── chat/           # 🚧 Placeholder page\n│   │   │   ├── delivery/       # 🚧 Placeholder page\n│   │   │   ├── expense/        # 🚧 Placeholder page\n│   │   │   ├── notes/          # 🚧 Placeholder page\n│   │   │   ├── shop/           # 🚧 Placeholder page\n│   │   │   ├── social/         # 🚧 Placeholder page\n│   │   │   ├── urlshort/       # 🚧 Placeholder page\n│   │   │   └── weather/        # 🚧 Placeholder page\n│   │   ├── layout.tsx          # Root layout\n│   │   └── providers.tsx       # React Query \u0026 theme providers\n│   ├── components/             # Reusable components\n│   ├── lib/                    # Utilities and API client\n│   ├── public/                 # Static assets\n│   └── package.json\n│\n├── mobile/                     # React Native (Expo) app\n│   ├── app/                    # Expo Router screens\n│   │   ├── (auth)/             # Auth screens\n│   │   ├── (tabs)/             # Tab navigation\n│   │   └── _layout.tsx         # Root layout\n│   ├── src/\n│   │   ├── api/                # API client\n│   │   ├── components/         # Reusable components\n│   │   ├── hooks/              # Custom hooks\n│   │   ├── store/              # Zustand stores\n│   │   ├── types/              # TypeScript types\n│   │   └── utils/              # Helper functions\n│   └── package.json\n│\n└── docs/                       # Documentation\n    ├── ADVANCED_AUTH.md        # Authentication guide\n    ├── ARCHITECTURE.md         # System architecture\n    ├── CREATING_NEW_SERVICE.md # Service creation tutorial\n    ├── DEPLOYMENT.md           # Deployment guide\n    ├── DEVELOPMENT_GUIDE.md    # Developer workflow\n    └── PROJECT_STRUCTURE.md    # Detailed structure guide\n```\n\n\u003e For detailed structure documentation, see [PROJECT_STRUCTURE.md](./docs/PROJECT_STRUCTURE.md)\n\n---\n\n## 🏃 Quick Start\n\n### Prerequisites\n\n- **Node.js** 18+ ([Download](https://nodejs.org/))\n- **Yarn** 1.22+ (recommended) or npm\n- **MongoDB** - Local installation or [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) (free tier)\n- **Redis** - [Upstash Redis](https://upstash.com/redis) (free tier) or local installation\n- **For Mobile**: [Expo Go](https://expo.dev/client) app on your phone or Android/iOS emulator\n\n### Installation\n\nThis monorepo uses **independent `node_modules`** for each package (not Yarn workspaces) to ensure proper dependency isolation, especially important for React Native/Expo.\n\n#### Option 1: Automated Setup (Recommended)\n\n```bash\n# Clone the repository\ngit clone \u003cyour-repo-url\u003e\ncd fullstack-master-repo\n\n# Run the automated setup script\nchmod +x setup.sh\n./setup.sh\n```\n\nThe setup script will:\n1. Clean all existing `node_modules` directories\n2. Install dependencies for each package (shared, backend, web, mobile)\n3. Build the shared package\n4. Verify all installations\n\n#### Option 2: Manual Setup\n\n```bash\n# Clone the repository\ngit clone \u003cyour-repo-url\u003e\ncd fullstack-master-repo\n\n# Install all packages at once\nyarn install:all\n\n# Or install individually:\ncd shared \u0026\u0026 yarn install \u0026\u0026 yarn build \u0026\u0026 cd ..\ncd backend \u0026\u0026 yarn install \u0026\u0026 cd ..\ncd web \u0026\u0026 yarn install \u0026\u0026 cd ..\ncd mobile \u0026\u0026 yarn install \u0026\u0026 cd ..\n```\n\n### Running the Applications\n\n#### 1. Start Backend API\n\n```bash\ncd backend\n\n# Copy environment file\ncp .env.example .env\n\n# Update .env with your configuration:\n# - MongoDB URI (local or Atlas)\n# - JWT secrets\n# - Email credentials (for OTP)\n# - Redis URL (Upstash or local)\n\n# Run development server\nyarn dev\n\n# API will be available at http://localhost:8000\n# Swagger docs at http://localhost:8000/api-docs\n```\n\n#### 2. Start Web Application\n\n```bash\n# In a new terminal\ncd web\n\n# Run development server\nyarn dev\n\n# Web app will be available at http://localhost:3000\n```\n\n#### 3. Start Mobile Application\n\n```bash\n# In a new terminal\ncd mobile\n\n# Update API base URL in src/api/config.ts:\n# - iOS simulator: http://localhost:8000\n# - Android emulator: http://10.0.2.2:8000\n# - Physical device: http://YOUR_COMPUTER_IP:8000\n\n# Start Expo\nyarn start\n\n# Scan QR code with Expo Go app (iOS/Android)\n# Or press 'a' for Android emulator, 'i' for iOS simulator\n```\n\n#### Run All Applications Concurrently\n\n```bash\n# From root directory\nyarn dev\n\n# This runs: shared (watch mode), backend, and web concurrently\n# Mobile must be started separately\n```\n\n---\n\n## 🔧 Environment Variables\n\n### Backend (`.env`)\n\nCreate a `.env` file in the `backend` directory:\n\n```env\n# Server\nPORT=8000\nNODE_ENV=development\n\n# MongoDB\nMONGO_URI=mongodb://localhost:27017/nexus\n# Or use MongoDB Atlas:\n# MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/dbname\n\n# JWT\nJWT_SECRET=your-super-secret-jwt-key-change-this-in-production-min-32-chars\nJWT_EXPIRES_IN=15m\nJWT_REFRESH_SECRET=your-super-secret-refresh-key-change-this-in-production-min-32-chars\nJWT_REFRESH_EXPIRES_IN=7d\n\n# CORS\nCORS_ORIGIN=http://localhost:3000\n\n# Redis (Upstash - for OTP and caching)\n# Get your Redis URL from https://upstash.com/redis\n# Format: rediss://default:PASSWORD@HOST:PORT\nREDIS_DATABASE_URI=rediss://default:your-password@your-host.upstash.io:6379\n\n# Email (for OTP delivery)\nEMAIL_HOST=smtp.gmail.com\nEMAIL_PORT=587\nEMAIL_SECURE=false\nEMAIL_USER=your-email@gmail.com\nEMAIL_PASSWORD=your-app-password\nEMAIL_FROM=noreply@nexus.app\n\n# OTP Configuration\nOTP_EXPIRY_MINUTES=10\n```\n\n\u003e **Generate secure JWT secrets:**\n\u003e ```bash\n\u003e node -e \"console.log(require('crypto').randomBytes(64).toString('hex'))\"\n\u003e ```\n\n### Mobile (`src/api/config.ts`)\n\nUpdate the API base URL in `mobile/src/api/config.ts`:\n\n```typescript\n// For iOS simulator\nexport const API_BASE_URL = 'http://localhost:8000';\n\n// For Android emulator\nexport const API_BASE_URL = 'http://10.0.2.2:8000';\n\n// For physical device (use your computer's local IP)\nexport const API_BASE_URL = 'http://192.168.x.x:8000';\n```\n\n---\n\n## 📜 Available Scripts\n\n### Root Directory\n\n```bash\nyarn install:all      # Install dependencies for all packages\nyarn build:shared     # Build shared package\nyarn build:all        # Build shared, backend, and web\nyarn dev              # Run shared (watch), backend, and web concurrently\nyarn dev:backend      # Run backend only\nyarn dev:web          # Run web only\nyarn dev:mobile       # Run mobile only\nyarn clean            # Remove all node_modules\nyarn test             # Run backend tests\nyarn lint             # Lint backend and web\n```\n\n### Backend\n\n```bash\nyarn dev              # Start development server with hot reload\nyarn build            # Build TypeScript to JavaScript\nyarn start            # Start production server\nyarn test             # Run unit tests with coverage\nyarn test:watch       # Run tests in watch mode\nyarn test:e2e         # Run E2E tests\n```\n\n### Web\n\n```bash\nyarn dev              # Start Next.js development server\nyarn build            # Build for production\nyarn start            # Start production server\nyarn lint             # Run ESLint\n```\n\n### Mobile\n\n```bash\nyarn start            # Start Expo development server\nyarn android          # Run on Android emulator\nyarn ios              # Run on iOS simulator\nyarn web              # Run in web browser\nyarn lint             # Run ESLint\n```\n\n### Shared\n\n```bash\nyarn build            # Build TypeScript to JavaScript\nyarn dev              # Build in watch mode\nyarn clean            # Remove dist directory\n```\n\n---\n\n## 🔐 Authentication\n\nThe monorepo includes a complete, production-ready JWT-based authentication system with email verification.\n\n### Features\n\n- **User Registration** - Password hashing with bcrypt (10 rounds)\n- **Email Verification** - 6-digit OTP sent via email\n- **Login** - JWT access token (15min) + refresh token (7 days)\n- **Token Refresh** - Automatic token rotation\n- **Password Reset** - Secure OTP-based flow\n- **Protected Routes** - Authentication middleware\n- **User Profile** - Get and update user information\n- **Logout** - Token invalidation\n\n### Authentication Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Frontend\n    participant Backend\n    participant MongoDB\n    participant Redis\n    participant Email\n\n    User-\u003e\u003eFrontend: Register\n    Frontend-\u003e\u003eBackend: POST /api/auth/register\n    Backend-\u003e\u003eMongoDB: Create user\n    Backend-\u003e\u003eRedis: Store OTP\n    Backend-\u003e\u003eEmail: Send OTP\n    Backend-\u003e\u003eFrontend: __nexus__production__token__access__token + __nexus__production__token__refresh__token\n    Frontend-\u003e\u003eUser: Check email for OTP\n\n    User-\u003e\u003eFrontend: Enter OTP\n    Frontend-\u003e\u003eBackend: POST /api/auth/verify-email\n    Backend-\u003e\u003eRedis: Verify OTP\n    Backend-\u003e\u003eMongoDB: Mark email verified\n    Backend-\u003e\u003eFrontend: Success\n    Frontend-\u003e\u003eUser: Email verified\n```\n\n\u003e For detailed authentication documentation, see [ADVANCED_AUTH.md](./docs/ADVANCED_AUTH.md)\n\n---\n\n## 📝 API Endpoints\n\n### Authentication\n\n```\nPOST   /api/auth/register              # Register new user\nPOST   /api/auth/verify-email          # Verify email with OTP\nPOST   /api/auth/resend-verification   # Resend verification OTP\nPOST   /api/auth/login                 # Login user\nPOST   /api/auth/refresh-token         # Refresh access token\nPOST   /api/auth/forgot-password       # Request password reset OTP\nPOST   /api/auth/reset-password        # Reset password with OTP\nGET    /api/auth/me                    # Get current user (protected)\nPUT    /api/auth/me                    # Update user profile (protected)\nPOST   /api/auth/logout                # Logout user (protected)\n```\n\n### TODOs\n\n```\nPOST   /api/todos          # Create TODO (protected)\nGET    /api/todos          # Get all TODOs with pagination (protected)\nGET    /api/todos/:id      # Get TODO by ID (protected)\nPUT    /api/todos/:id      # Update TODO (protected)\nDELETE /api/todos/:id      # Delete TODO (protected)\nDELETE /api/todos          # Delete all TODOs (protected)\n```\n\n### API Documentation\n\nInteractive API documentation is available at:\n- **Swagger UI**: `http://localhost:8000/api-docs`\n- **OpenAPI JSON**: `http://localhost:8000/api-docs.json`\n\n---\n\n## 📚 Documentation\n\n- **[ARCHITECTURE.md](./docs/ARCHITECTURE.md)** - System architecture and design patterns\n- **[PROJECT_STRUCTURE.md](./docs/PROJECT_STRUCTURE.md)** - Detailed project structure guide\n- **[ADVANCED_AUTH.md](./docs/ADVANCED_AUTH.md)** - Authentication features and flows\n- **[CREATING_NEW_SERVICE.md](./docs/CREATING_NEW_SERVICE.md)** - Tutorial for creating new services\n- **[DEPLOYMENT.md](./docs/DEPLOYMENT.md)** - Deployment guide for all platforms\n- **[DEVELOPMENT_GUIDE.md](./docs/DEVELOPMENT_GUIDE.md)** - Developer workflow and best practices\n- **[Backend README](./backend/README.md)** - Backend-specific documentation\n\n---\n\n## 🛠️ Tech Stack\n\n### Backend\n- **Runtime**: Node.js 18+\n- **Framework**: Express.js 4.21+\n- **Database**: MongoDB with Mongoose 9.0+\n- **Cache**: Redis with ioredis 5.3+ (Upstash)\n- **Authentication**: JWT + bcrypt\n- **Email**: Nodemailer 6.9+\n- **WebSocket**: Socket.IO 4.6+\n- **Validation**: Zod 3.22+\n- **Testing**: Jest 29+ + Supertest\n- **Documentation**: Swagger/OpenAPI\n- **Security**: Helmet, CORS, express-rate-limit\n\n### Shared\n- **Language**: TypeScript 5.9+\n- **Validation**: Zod 3.22+\n- **Build**: TypeScript Compiler\n\n### Web\n- **Framework**: Next.js 16\n- **React**: React 19\n- **Styling**: TailwindCSS 4 with PostCSS\n- **UI Components**: Radix UI primitives\n- **State Management**: Zustand 5 + React Query 5\n- **Forms**: React Hook Form 7 + Zod\n- **HTTP Client**: Axios 1.13+\n- **WebSocket**: Socket.IO Client 4.8+\n- **Theme**: next-themes 0.4+\n- **Language**: TypeScript 5+\n- **Linting**: ESLint 9\n\n### Mobile\n- **Framework**: React Native 0.81 with Expo 54\n- **React**: React 19\n- **Navigation**: Expo Router 6\n- **UI Components**: Tamagui 1.141 + React Native Paper 5\n- **State Management**: Zustand 5 with MMKV 4 persistence\n- **Forms**: React Hook Form 7 + Zod 4\n- **HTTP Client**: Axios 1.13+\n- **WebSocket**: Socket.IO Client 4.8+\n- **Language**: TypeScript 5.9+\n\n---\n\n## 🚢 Deployment\n\n### Backend Deployment\n\nDeploy to:\n- **Render** - Free tier available\n- **Railway** - Easy deployment with CLI\n- **Heroku** - Classic PaaS\n- **Docker** - Containerized deployment\n- **VPS** - DigitalOcean, AWS EC2, etc.\n\n### Web Deployment\n\nDeploy to:\n- **Vercel** - Optimized for Next.js (recommended)\n- **Netlify** - Great for static sites\n- **Railway** - Full-stack deployment\n- **Docker** - Containerized deployment\n\n### Mobile Deployment\n\nBuild and deploy with:\n- **EAS Build** - Expo Application Services\n- **App Store** - iOS deployment\n- **Google Play Store** - Android deployment\n\n\u003e For detailed deployment instructions, see [DEPLOYMENT.md](./docs/DEPLOYMENT.md)\n\n### Automated Deployment with GitHub Actions\n\nThe repository includes a GitHub Actions workflow for automated backend deployment to Render.\n\n**How it works:**\n- Automatically deploys backend when changes to `backend/` or `shared/` folders are merged to `master` branch\n- Skips deployment for changes to web, mobile, or documentation files\n- Supports manual deployment trigger from GitHub Actions tab\n\n**Setup:**\n1. Create a Render web service for your backend\n2. Get Deploy Hook URL from Render Dashboard → Your Service → Settings → Deploy Hook\n3. Add GitHub secret:\n   - Go to your repository → Settings → Secrets and variables → Actions\n   - Create new secret: `RENDER_DEPLOY_HOOK_URL`\n   - Paste your Deploy Hook URL as the value\n4. Push changes to `master` branch - deployment will trigger automatically!\n\n**Manual Deployment:**\n- Go to GitHub Actions tab → \"Deploy Backend to Render\" → \"Run workflow\"\n\n---\n\n## 🧪 Testing\n\n### Backend Tests\n\n```bash\ncd backend\n\n# Run all tests with coverage\nyarn test\n\n# Run tests in watch mode\nyarn test:watch\n\n# Run E2E tests\nyarn test:e2e\n```\n\nTest coverage includes:\n- ✅ Authentication flow (register, login, verify, reset)\n- ✅ TODO CRUD operations\n- ✅ Validation and error handling\n- ✅ User-scoped data access\n- ✅ Token refresh and rotation\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! This is a learning-focused monorepo.\n\n### Ways to Contribute\n\n1. **Implement Placeholder Services** - Choose from 9 placeholder services\n2. **Enhance UI/UX** - Improve web and mobile interfaces\n3. **Add Tests** - Increase test coverage\n4. **Improve Documentation** - Fix typos, add examples\n5. **Add Features** - File uploads, notifications, search, etc.\n6. **Fix Bugs** - Report and fix issues\n\n### Development Workflow\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Run tests (`yarn test`)\n5. Commit your changes (`git commit -m 'Add amazing feature'`)\n6. Push to the branch (`git push origin feature/amazing-feature`)\n7. Open a Pull Request\n\n\u003e See [DEVELOPMENT_GUIDE.md](./docs/DEVELOPMENT_GUIDE.md) for detailed workflow and conventions.\n\n---\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n#### MongoDB Connection Failed\n- Verify `MONGO_URI` in `.env`\n- Check MongoDB is running (local) or IP whitelist (Atlas)\n- Ensure network connectivity\n\n#### Redis Connection Failed\n- Verify `REDIS_DATABASE_URI` format: `rediss://` for TLS\n- Check Upstash dashboard for correct credentials\n- For local Redis: ensure it's running (`redis-cli ping`)\n\n#### Mobile App Not Connecting to Backend\n- Check API base URL in `mobile/src/api/config.ts`\n- Use `10.0.2.2` for Android emulator\n- Use your computer's local IP for physical devices\n- Ensure backend is running and accessible\n\n#### Email OTP Not Sending\n- Verify email credentials in `.env`\n- For Gmail: use App Password, not regular password\n- Check spam folder\n- Review backend logs for email errors\n\n#### Shared Package Changes Not Reflecting\n```bash\ncd shared\nyarn build\n# Restart backend/web/mobile dev servers\n```\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🙏 Acknowledgments\n\nBuilt with best practices from:\n- [Express.js Documentation](https://expressjs.com/)\n- [MongoDB Best Practices](https://www.mongodb.com/docs/manual/)\n- [TypeScript Handbook](https://www.typescriptlang.org/docs/)\n- [Next.js Documentation](https://nextjs.org/docs)\n- [React Native Documentation](https://reactnative.dev/)\n- [Expo Documentation](https://docs.expo.dev/)\n- [Jest Testing Library](https://jestjs.io/)\n- [Swagger/OpenAPI Specification](https://swagger.io/specification/)\n\n---\n\n## 📞 Support\n\n- **Documentation**: Check the [docs](./docs) directory\n- **Issues**: [GitHub Issues](https://github.com/your-repo/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/your-repo/discussions)\n\n---\n\n**Happy Coding! 🚀**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahadot786%2Ffullstack-master-repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshahadot786%2Ffullstack-master-repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahadot786%2Ffullstack-master-repo/lists"}