Unified enterprise-grade repository for GPROD ecosystem
Tech Stack • Quick Start • Deployment • Architecture • Contributing
GPROD is a enterprise-grade monorepo built for scalable microservices architecture. Combining powerful backend APIs with modern frontend interfaces, all unified under robust CI/CD pipelines and Kubernetes orchestration.
- 🔥 Monorepo Architecture - Unified development workflow
- 🚀 Microservices Ready - Scalable backend with NestJS
- ⚡ Modern Frontend - React with Feature-Sliced Design
- 🔐 Enterprise Security - JWT auth, SSL certificates, role-based access
- 🐳 Containerized - Docker & Kubernetes native
- 📦 Shared Packages - Reusable components and utilities
- 🔄 Multi-Environment - Dev, Staging, Production ready
- 📈 Monitoring & Health Checks - Built-in observability
📁 gprod-monorepo/
├── 📱 apps/
│ ├── 🔧 backend/ # NestJS API (Git Submodule)
│ └── 🎨 frontend/ # React SPA (Git Submodule)
├── 📦 packages/ # Shared libraries
│ ├── 🔗 shared-types/ # Common TypeScript interfaces
│ ├── 🧩 ui-components/ # Reusable UI components
│ └── 🛠️ utils/ # Utility functions
├── 🔧 tools/ # Development tooling
├── ⚙️ .github/workflows/ # CI/CD pipelines
├── 🐳 docker-compose.yml # Local development
└── 📚 docs/ # Documentation
# 1️⃣ Clone the monorepo
git clone https://github.com/TheMacroeconomicDao/gprod-monorepo.git
cd gprod-monorepo
# 2️⃣ Initialize submodules
git submodule init && git submodule update
# 3️⃣ Install dependencies
pnpm install
# 4️⃣ Start development environment
pnpm dev# Start all services
pnpm docker:up
# View logs
pnpm docker:logs
# Stop services
pnpm docker:down| Command | Description | Scope |
|---|---|---|
pnpm dev |
🔥 Start all apps in development | All |
pnpm build |
📦 Build all applications | All |
pnpm test |
🧪 Run all tests | All |
pnpm backend:dev |
🔧 Start backend only | Backend |
pnpm frontend:dev |
🎨 Start frontend only | Frontend |
pnpm k8s:deploy |
🚀 Deploy to Kubernetes | DevOps |
- 🔧 Development: Continuous deployment on push to
dev - 🧪 Staging: Manual deployment for testing
- 🌐 Production: Protected deployments with approval
- Branch Protection: Prevent direct pushes to main
- Automated Testing: Pre-deployment validation
- Health Checks: Post-deployment verification
- Rollback: Automatic rollback on failure
🔍 Click to expand infrastructure details
- Deployments: Auto-scaling backend services
- Services: Load balancing and service discovery
- Ingress: HTTPS routing with SSL certificates
- ConfigMaps: Environment-specific configuration
- Secrets: Secure credential management
- Health Endpoints:
/healthand/health/db - Logging: Structured logging with different levels
- Metrics: Performance and usage monitoring
- Alerts: Telegram notifications for deployments
graph TD
A[GPROD Monorepo] --> B[Backend Submodule]
A --> C[Frontend Submodule]
A --> D[Shared Packages]
B --> E[GitHub Repository]
C --> F[GitLab Repository]
D --> G[Types, Components, Utils]
- 🎯 Centralized Dependencies: Shared versions across all packages
- ⚡ Efficient Builds: Only build changed packages
- 🔄 Code Reuse: Shared components and utilities
- 🧪 Consistent Testing: Unified testing strategy
- 🛡️ Authentication: JWT-based auth with refresh tokens
- 🔑 Authorization: Role-based access control (RBAC)
- 🔒 HTTPS: Let's Encrypt SSL certificates
- 🛡️ Input Validation: Comprehensive request validation
- 🔐 Environment Isolation: Separate secrets per environment
🔧 Backend (`apps/backend/`)
- 🎯 RESTful API: Complete CRUD operations
- 🔐 Authentication: JWT + Refresh token strategy
- 🗄️ Database: PostgreSQL with Prisma ORM
- 📊 Health Checks: Application and database monitoring
- 🔍 Validation: Request/response validation with class-validator
- 📚 Documentation: OpenAPI/Swagger integration
- Framework: NestJS 10+
- Database: PostgreSQL 15+
- ORM: Prisma 5+
- Validation: class-validator, class-transformer
- Security: Passport, JWT
🎨 Frontend (`apps/frontend/`)
- ⚡ Modern SPA: React 18 with Vite
- 🏗️ Architecture: Feature-Sliced Design (FSD)
- 📊 State Management: TanStack Query for server state
- 🎨 UI Components: Reusable component library
- 📱 Responsive: Mobile-first design approach
- 🧪 Testing: Unit and integration tests
- Framework: React 18+
- Build Tool: Vite 4+
- Routing: React Router 6+
- HTTP Client: Axios
- State: TanStack Query
📦 Shared Packages (`packages/`)
Common TypeScript interfaces and types used across backend and frontend.
Reusable React components with consistent styling and behavior.
Common utility functions for data manipulation, validation, and formatting.
- 🍴 Fork the repository
- 🌿 Create feature branch:
git checkout -b feature/amazing-feature - 🔧 Work in submodules as needed for specific apps
- ✅ Test your changes:
pnpm test - 💅 Lint code:
pnpm lint - 📝 Commit changes:
git commit -m 'Add amazing feature' - 🚀 Push to branch:
git push origin feature/amazing-feature - 🔀 Open Pull Request
- 🎯 TypeScript: Strict type checking enabled
- 💅 Prettier: Code formatting enforced
- 🔍 ESLint: Code quality and consistency
- 🧪 Testing: Unit tests required for new features
- 📚 Documentation: Update README and docs as needed
# Update all submodules
git submodule update --remote --merge
# Work in specific submodule
cd apps/backend
git checkout -b feature/backend-improvement
# Make changes, commit, push
# Update parent repo
cd ../..
git add apps/backend
git commit -m "update backend submodule to include new feature"- 🌐 Production Environment: Complete production deployment setup
- 🧪 Staging Pipeline: Implement staging environment
- 📊 Monitoring: Enhanced monitoring and alerting
- 📱 Mobile App: React Native mobile application
- 🔧 Microservices: Split backend into domain-specific services
- 📊 Analytics: Advanced analytics and reporting
- 🤖 AI Integration: ML-powered features
- 🐛 Bug Reports: GitHub Issues
- 💬 Questions: GitHub Discussions
- 📚 Documentation: Project Wiki
- 📧 Email: support@gprod.org
This project is licensed under the MIT License - see the LICENSE file for details.
🚀 Built with ❤️ by The Macroeconomic DAO
Empowering decentralized development through innovative technology