Getting Started
Before contributing, make sure you have:- Read the Local Setup guide
- Familiarized yourself with the Monorepo Structure
- Reviewed the Testing documentation
Development Workflow
Quality Gates
All contributions must pass these quality gates:Lint
ESLint checks code style and catches common mistakes.Fix auto-fixable issues:
Typecheck
TypeScript ensures type safety across the codebase.Must pass with zero errors.
Test
Vitest runs unit and integration tests.Add tests for new features and bug fixes.
Build
TypeScript Compiler ensures the project builds successfully.Verifies all packages compile without errors.
Project Rules
TypeScript
- Strict Mode
- ESM Imports
The project uses TypeScript strict mode. Key requirements:
- No implicit
anytypes - Strict null checks enabled
- All function parameters and return types should be typed
- Use
unknowninstead ofanywhen type is truly unknown
Security
API-Only Secrets
These secrets belong ONLY in API runtime:
CLOUDFLARE_API_TOKENSLACK_CLIENT_SECRETJWT_SECRETREFRESH_TOKEN_SECRET
No Logging
Never log sensitive data:
- Secrets or API tokens
- JWTs or refresh tokens
- User passwords
- Full Cloudflare API responses
[REDACTED] in logs when debugging auth flows.Least Privilege
Cloudflare API token should have minimal scopes:
- Tunnel: Read and Write
- DNS: Read and Write
- Zone: Read only
Token Expiry
Respect token lifetimes:
- Access tokens: 15 minutes (configurable)
- Refresh tokens: 30 days (configurable)
- Tunnel run tokens: Tied to tunnel lifecycle
Pull Request Checklist
Before opening a PR, ensure:- All quality gates pass (
lint,typecheck,test,build) - Tests added/updated for behavioral changes
- Documentation updated if needed:
-
README.mdfor setup/command changes -
.env.examplefor new environment variables - Inline code comments for complex logic
-
- No secret values in committed files
- Commit messages are clear and descriptive
- PR description explains the “why” behind changes
- Breaking changes are clearly documented
PR Template
When opening a PR, include:Code Style Conventions
- Naming
- Comments
- Error Handling
- Async/Await
Release Process
Tag-Driven Releases
Releases are triggered by pushing version tags:Release Workflow
The.github/workflows/release.yml workflow:
.github/workflows/release.yml
Publish Order:
@ripeseed/shared must publish before @ripeseed/rs-tunnel because the CLI depends on the shared package.Required GitHub Secret
The release workflow requires a GitHub Actions secret:NPM_TOKEN: npm access token with publish rights for@ripeseedscope
- Log in to npmjs.com
- Go to Access Tokens → Generate New Token
- Select “Automation” type
- Add publish scope for
@ripeseed - Add token to GitHub repository secrets as
NPM_TOKEN
Post-Release
After packages publish:Non-Negotiable Product Constraints
When contributing, respect these core product rules:Email Domain Enforcement
Email Domain Enforcement
Only emails ending in
ALLOWED_EMAIL_DOMAIN are allowed.Slack Workspace Check
Slack Workspace Check
Slack workspace must match
ALLOWED_SLACK_TEAM_ID.Single-Label Slugs Only
Single-Label Slugs Only
No nested domains allowed. Slugs must be single-label DNS labels.
Tunnel Quota
Tunnel Quota
Maximum 5 active tunnels per user (server-side enforcement).
DNS Cleanup on Stop
DNS Cleanup on Stop
DNS records must be deleted when tunnel stops.
Stale Lease Cleanup
Stale Lease Cleanup
If client dies, cleanup worker must remove tunnel + DNS.
No Provider Credentials in CLI
No Provider Credentials in CLI
CLI must never hold Cloudflare API credentials.
Getting Help
If you need help:- Questions: Open a GitHub Discussion
- Bugs: Open a GitHub Issue
- Security: See SECURITY.md
For security vulnerabilities, do NOT open public issues. Follow the responsible disclosure process in SECURITY.md.
Code of Conduct
This project follows the Contributor Covenant Code of Conduct. Be respectful and professional in all interactions.License
By contributing, you agree that your contributions will be licensed under the MIT License.Next Steps
Local Setup
Set up your development environment
Testing
Learn about testing practices
Monorepo Structure
Understand the codebase organization
Architecture
Learn about system architecture

