A production-ready monorepo with React frontend, Node.js backend, and Python ML service.
- client: React + Vite + TypeScript + Tailwind CSS + React Router + Zustand + Socket.io + Axios
- server: Node.js + Express + TypeScript + Mongoose + Socket.io + Zod + Winston
- ml-service: Python FastAPI + sentence-transformers + scikit-learn + uvicorn + pydantic
- Node.js 18+ and pnpm
- Python 3.9+
- Docker and Docker Compose
-
Clone and install dependencies:
git clone <repository-url> cd ninerconnect pnpm install
-
Set up environment variables:
cp client/.env.example client/.env cp server/.env.example server/.env cp ml-service/.env.example ml-service/.env
-
Start development environment:
pnpm dev
-
Or start with Docker:
docker-compose up -d
pnpm dev- Start all services in development modepnpm build- Build all packagespnpm test- Run tests for all packagespnpm lint- Lint all packagespnpm typecheck- Type check all packages
Client:
pnpm --filter client dev- Start React dev serverpnpm --filter client build- Build for productionpnpm --filter client preview- Preview production build
Server:
pnpm --filter server dev- Start Express server in dev modepnpm --filter server build- Build TypeScriptpnpm --filter server start- Start production server
ML Service:
pnpm --filter ml-service dev- Start FastAPI in dev modepnpm --filter ml-service start- Start production FastAPI
VITE_API_URL=http://localhost:3001
VITE_SOCKET_URL=http://localhost:3001
PORT=3001
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/ninerconnect
JWT_SECRET=your-jwt-secret-here
CORS_ORIGIN=http://localhost:5173
ML_SERVICE_PORT=8000
MODEL_PATH=./models
LOG_LEVEL=info
GET /api/health- Health checkPOST /api/auth/login- User authenticationGET /api/users- Get users
GET /health- Health checkPOST /embed- Text embeddingPOST /predict- ML prediction
connection- Client connectionmessage- Chat messagesnotification- Real-time notifications
The project includes Docker Compose configuration for local development:
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downGitHub Actions workflows are configured for:
- Type checking
- Linting
- Testing
- Build verification
ninerconnect/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Route components
│ │ ├── store/ # Zustand stores
│ │ ├── utils/ # Utility functions
│ │ └── types/ # TypeScript types
│ └── package.json
├── server/ # Node.js backend
│ ├── src/
│ │ ├── controllers/ # Route controllers
│ │ ├── models/ # Mongoose models
│ │ ├── routes/ # Express routes
│ │ ├── services/ # Business logic
│ │ ├── middleware/ # Custom middleware
│ │ └── utils/ # Utility functions
│ └── package.json
├── ml-service/ # Python ML service
│ ├── app/
│ │ ├── api/ # FastAPI routes
│ │ ├── models/ # ML models
│ │ ├── services/ # ML services
│ │ └── utils/ # Utility functions
│ └── requirements.txt
├── docker-compose.yml # Docker services
├── package.json # Root package.json
└── README.md
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
MIT License - see LICENSE file for details.