Welcome to the MechHub engineering repository. MechHub is a high-performance B2B industrial marketplace designed to bridge the gap between mechanical component manufacturers and industrial buyers.
Our platform handles complex procurement workflows, automated quoting, and multi-part manufacturing project management with a focus on speed, precision, and reliability.
Follow these steps to get your local environment running in under 5 minutes:
- Node.js: Version 18.x or 20.x (LTS recommended)
- NPM: Version 9.x+
git clone https://github.com/DivyanshuRanjanDynamic/studio.git
cd studio
npm installCreate a .env.local file in the root directory and request the latest keys from your team lead.
Important
Never commit your .env.local file to version control.
npm run devOpen http://localhost:9002 to see the application.
We follow a Layered Service-Oriented Architecture to ensure the codebase remains maintainable as we scale.
src/app/: Next.js App Router. Contains page layouts and API route boundaries.src/services/: Business Logic Layer. All heavy lifting (price calculations, order logic) happens here.src/controllers/: Request Handling. Bridges the Gap between APIs and Services.src/components/: Modular UI components (organized by project area).src/utils/: Shared utilities (Financial math, shared constants).src/types/: Centralized TypeScript definitions and interfaces.src/firebase/: Client-side Firebase hooks and configuration.src/lib/: Server-side Admin SDK and core library initializations.
To maintain our high engineering standards, please follow these guidelines:
- Branching: Create a feature branch from
main:feat/your-feature-nameorfix/issue-description. - Commit Messages: Use conventional commits (e.g.,
feat: add automated tax calculation). - Pull Requests: Tag your team lead for review. Ensure all lint checks pass.
- TypeScript First: Avoid using
any. Define interfaces insrc/types/. - Service Pattern: If you're adding business logic, create a service. Don't put logic directly in API routes.
- Aesthetics Matter: We use a premium design language. Ensure your UI changes align with our "Studio" aesthetic.
- Comments: Write simple, beginner-friendly comments for complex logic (use the
calculateProjectFinancesutility as a reference).
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database/Auth: Firebase (Firestore & Auth)
- Payments: Razorpay Integration
- Infrastructure: Vercel
Divyanshu Ranjan
Founder & Lead Engineer — MechHub
Building the future of industrial procurement.