Prerequisites
Before you begin, ensure you have the following installed:- Node.js: v22 or higher
- pnpm: v10.19.0 or higher (Gitflare uses pnpm workspaces)
- Cloudflare Account: Required for deployment (free tier works)
Installation
Install dependencies
Install all workspace dependencies using pnpm:This will install dependencies for all packages in the monorepo.
Set up environment variables
Navigate to the web app directory and copy the example environment file:Edit the
.env file and configure the required environment variables for Cloudflare D1, authentication, and other services.Run database migrations
Apply database migrations to set up your local D1 database:For production deployments, use
pnpm db:migrate:remote instead.Verify your setup
Once the development server is running, you can:- Open your browser to the local development URL (typically shown in the terminal)
- Test the web interface for repository management
- Try Git operations against your local instance
Database management
Gitflare uses Drizzle ORM for database schema management:- Generate migrations:
pnpm db:generate- Create new migration files from schema changes - Local migrations:
pnpm db:migrate:local- Apply migrations to local D1 database - Remote migrations:
pnpm db:migrate:remote- Apply migrations to production D1 database
Deployment
To deploy the web app to Cloudflare Workers:Next steps
- Review the project structure to understand the codebase organization
- Read the contribution guidelines before making changes
- Explore the Tech Stack to learn about the technologies used in Gitflare