Contributing
We welcome contributions! Here's how to get involved.
Development Setup
bash
git clone https://github.com/tapas100/flexgate-proxy.git
cd flexgate-proxy
npm install
cp .env.example .env # fill in your DB / Redis URLs
npm run db:migrate
npm run dev # starts with hot reloadProject Structure
flexgate-proxy/
├── app.ts # Express app + route setup
├── bin/ # CLI entry points
├── routes/ # API route handlers
├── src/
│ ├── middleware/ # Rate limiting, auth, metrics
│ ├── routes/ # Additional API routes
│ ├── services/ # Business logic
│ ├── database/ # DB repositories
│ └── ai/ # AI event types + templates
├── admin-ui/ # React admin dashboard
├── migrations/ # PostgreSQL migrations
├── scripts/ # Dev and ops scripts
├── docs/ # This documentation site
└── __tests__/ # Integration testsRunning Tests
bash
# All tests
npm test
# Integration tests only
npm run test:integration
# With coverage
npm test -- --coveragePull Request Guidelines
- Branch from
dev— notmain - One feature or fix per PR
- Add tests for new behaviour
- Update docs if you change config / API / env vars
- Run
npm run buildandnpm auditbefore opening PR
Reporting Issues
Please include:
- FlexGate version (
flexgate --version) - Node.js version (
node --version) - Steps to reproduce
- Expected vs actual behaviour