How debguin452/routeway works
Routeway lets developers configure fixed-destination API proxy routes and issue public tokens that cannot redirect to another upstream. The main workflow is dashboard/API signup and project-route management, followed by client requests through the Worker, which validates route controls, injects a decrypted secret, forwards upstream, and returns a filtered response. The README documents D1, KV, Durable Objects, and Pages as runtime services. Edges use excerpts or README statements; unsampled implementation details are represented only where documented.
Main entry points: proxy.ts Proxy Handler · index.ts Worker Router · auth.ts Authentication · projects.ts Project and Route Management
Components 20
Dashboard and API
- Dashboard
dashboard/app.js - Worker Router
src/index.ts - HTTP Responses and CORS
src/responses.ts
Accounts and Routes
- Authentication
src/auth.ts - Identity Helpers
src/identity.ts - Project and Route Management
src/projects.ts - Route Controls
src/settings.ts - Secrets and Password Crypto
src/crypto.ts
Secure Proxy
- Proxy Handler
src/proxy.ts - Target URL Builder
src/target.ts - Human Verification
src/human.ts
Runtime Services
- D1 Data Access
src/db.ts - D1 Database
- Session Store
- Rate Limit and Activity
src/rateLimiter.ts - Durable Objects
Other components
- Developer
- API Client
- Fixed Upstream API
- Cloudflare Turnstile
Connections 28
- Developer → Dashboard: configures routes
README.md - Dashboard → Worker Router: calls API
README.md - API Client → Worker Router: sends token request
README.md - Worker Router → Authentication: routes auth
src/index.ts - Worker Router → Project and Route Management: routes management
src/index.ts - Worker Router → Proxy Handler: dispatches proxy
src/index.ts - Worker Router → HTTP Responses and CORS: adds CORS
src/index.ts - Worker Router → Session Store: reads session
README.md - Authentication → D1 Data Access: reads and writes users
src/auth.ts - Authentication → Secrets and Password Crypto: hashes passwords
src/auth.ts - Authentication → Rate Limit and Activity: throttles login
src/auth.ts - Authentication → Session Store: stores sessions
README.md - Identity Helpers → Secrets and Password Crypto: derives signing keys
src/identity.ts - Project and Route Management → D1 Data Access: manages records
src/projects.ts - Project and Route Management → Secrets and Password Crypto: creates token hashes
src/projects.ts - Project and Route Management → Route Controls: validates controls
src/projects.ts - Project and Route Management → Rate Limit and Activity: reads activity
src/projects.ts - Proxy Handler → D1 Data Access: looks up token route
src/proxy.ts - Proxy Handler → Secrets and Password Crypto: hashes and decrypts
src/proxy.ts - Proxy Handler → Human Verification: checks verification
src/proxy.ts - Proxy Handler → Route Controls: applies route controls
src/proxy.ts - Proxy Handler → Target URL Builder: builds target URL
src/proxy.ts - Proxy Handler → Rate Limit and Activity: checks and logs
src/proxy.ts - Proxy Handler → Fixed Upstream API: forwards request
README.md - Proxy Handler → Cloudflare Turnstile: verifies challenge
README.md - D1 Data Access → D1 Database: reads and writes
README.md - Rate Limit and Activity → Durable Objects: dispatches counters
src/rateLimiter.ts - Human Verification → Identity Helpers: signs passes
src/human.ts