Prerequisites
Before getting started, ensure you have the following installed:- Node.js 18+ or Bun 1.0+
- Git for version control
- Cloudflare account (free tier works)
- GitHub account (for OAuth authentication)
Clone and Install
1. Clone the Repository
2. Install Dependencies
The project uses Bun workspaces for monorepo management:packages/frontend- React frontendpackages/worker- Hono API backendpackages/shared- Shared types and utilitiespackages/cli- CLI tools for program discovery
Environment Configuration
1. Create Environment File
Copy the example environment file:2. Configure Cloudflare Credentials
Obtain your Cloudflare credentials:- API Token: Visit Cloudflare Dashboard → Settings → API Tokens
- Account ID: Found in the top-left corner of the Cloudflare Dashboard
.env.local:
3. Configure GitHub OAuth
Set up GitHub OAuth application:- Go to GitHub Developer Settings
- Create a new OAuth App
- Set callback URL to:
http://localhost:5173/api/auth/callback - Copy Client ID and Secret
.env.local:
4. Configure JWT Secret
Generate a secure JWT secret:.env.local:
5. Optional Configuration
Additional environment variables:Database Setup
Run Database Migrations
Orquestra uses Cloudflare D1 (SQLite) for data storage. Initialize the database:migrations/001_initial_schema.sql- Creates core tablesmigrations/002_indexes.sql- Adds database indexes
users- GitHub-authenticated usersprojects- IDL projectsidl_versions- IDL version historyapi_keys- API authentication keysproject_socials- Social media linksknown_addresses- Project-specific addresses
Database Management Commands
Starting Development Servers
Option 1: Start Everything (Recommended)
Start both frontend and backend simultaneously:- Frontend: http://localhost:5173
- Backend API: http://localhost:8787
Option 2: Start Individually
Run servers in separate terminals: Terminal 1 - Frontend:Verify Setup
- Frontend: Open http://localhost:5173
- Backend Health: Visit http://localhost:8787/health
- Backend Ping: Visit http://localhost:8787/health/ping
Development Workflow
Available Scripts
Development Commands
Build Commands
Database Commands
CLI Tools
Cleanup
Hot Reload
Both frontend and backend support hot module replacement:- Frontend: Vite provides instant HMR - changes appear immediately
- Backend: Wrangler dev mode auto-reloads on file changes
Testing API Endpoints
Test the backend API using curl or any HTTP client:Troubleshooting
Port Already in Use
If you see “Port already in use” errors:Dependency Issues
If you encounter dependency errors:Build Errors
For TypeScript or linting errors:Database Migration Errors
If migrations fail:Cloudflare Authentication Issues
If you have Cloudflare authentication errors:Environment Variable Issues
Ensure your.env.local is properly configured and located in the project root.
For Cloudflare Workers, secrets are managed separately:
Next Steps
Once your local environment is set up:- Explore the Project Structure to understand the codebase
- Review the Database Schema to understand data models
- Check the API Documentation for available endpoints
- Read the Contributing Guide
Additional Resources
- SETUP_INSTRUCTIONS.md - Detailed setup guide (Turkish)
- Cloudflare Workers Docs
- Bun Documentation
- Hono Framework
- Vite Documentation