Thank you for your interest in contributing to SecondLayer! This guide will help you get started.
- Fork the repository and clone it locally
- Install dependencies:
npm run install:all - Set up environment: Copy
.env.examplefiles in each workspace to.envand configure - Start services: See docs/guides/START_HERE.md for full setup
- Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes
- Run the TypeScript build to verify no type errors:
cd packages/shared && npm run build cd mcp_backend && npm run build
- Run tests:
cd mcp_backend && npm test cd lexwebapp && npm run test
- Commit with a descriptive message
- Push and create a Pull Request against
main
- Keep PRs focused — one feature or fix per PR
- Include a clear description of what and why
- Ensure all builds pass and tests are green
- Update documentation if your change affects public APIs or setup
- Language: TypeScript throughout the monorepo
- UI text: Ukrainian (uk-UA) for all user-facing strings
- SQL: Use parameterized queries or double-dollar quoting in JS string literals
- Migrations: Always use
IF NOT EXISTS/CREATE OR REPLACEfor idempotency
SecondLayer/
├── mcp_backend/ # Primary MCP server (court decisions, legislation, registries, payments)
├── mcp_rada/ # Parliament data server (deputies, bills, voting)
├── mcp_openreyestr/ # State Register server (entities, beneficiaries, enforcement)
├── lexwebapp/ # Web frontend (React 19, Vite, TailwindCSS)
├── packages/shared/ # Shared TypeScript utilities
├── deployment/ # Docker, nginx, CI/CD scripts
├── tests/ # E2E tests (Playwright)
└── scripts/ # Utility and data import scripts
- Define tool schema in
mcp_backend/src/api/ - Implement handler method
- Register in
getTools()andsrc/api/tool-registry.ts - Add HTTP route in
http-server.tsif needed - Write tests in
src/api/__tests__/
- Use GitHub Issues for bug reports and feature requests
- Include reproduction steps, expected vs actual behavior
- For security vulnerabilities, see SECURITY.md
By contributing, you agree that your contributions will be licensed under the MIT License.