The codebase that powers boop.cat boop.cat
at main 92 lines 2.6 kB view raw view rendered
1# boop.cat codebase 2 3This is boop.cat's codebase, and it was released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). 4 5## Features 6 7- **Instant Deployment**: Connect any public or private Git repository. 8- **Auto-Deploy**: Automatically triggers a new build on every `push` to your main branch. (for GitHub only, use API for other platforms) 9- **Edge Delivery**: Powered by Cloudflare Workers for global caching and low latency. 10- **Managed SSL**: Automatic HTTPS for every site and custom domain. 11- **Environment Variables**: Full support for build-time environment variables. 12- **Clean API**: Manage your sites and deployments programmatically. 13 14## Tech Stack 15 16- **Backend**: Go (chi router, SQLite) 17- **Frontend**: React (Vite, Lucide Icons) 18- **Storage**: Backblaze B2 (Object storage) 19- **Delivery**: Cloudflare Workers (Edge Computing) & KV (Metadata) 20- **Database**: SQLite (Local file-based database) 21 22## Getting Started 23 24### 1. Prerequisites 25 26- [Go](https://go.dev/) 1.23+ 27- [Node.js](https://nodejs.org/) 22+ (with `pnpm` or `bun`) 28- [Cloudflare Account](https://dash.cloudflare.com/) (Token, Account ID, Zone ID) 29- [Backblaze B2 Account](https://www.backblaze.com/b2/cloud-storage.html) (Key ID, App Key, Bucket) 30 31### 2. Installation 32 33```bash 34# Clone the repository 35git clone https://tangled.org/scanash.com/boop.cat 36or 37git clone https://github.com/scanash00/boop.cat 38cd boop.cat 39 40# Install frontend dependencies 41npm install 42``` 43 44### 3. Configuration 45 46Copy the example environment file and fill in your credentials: 47 48```bash 49cp .env.example .env 50``` 51 52Key variables to configure: 53 54- `SESSION_SECRET`: Random string for sessions. 55- `FSD_DATA_DIR`: Path where the SQLite database will be stored. 56- `CF_*`: Your Cloudflare API credentials. 57- `B2_*`: Your Backblaze B2 storage credentials. 58 59### 4. Running Locally 60 61**Start the Go Backend:** 62 63```bash 64cd backend-go 65go run main.go 66``` 67 68The backend serves the frontend from `client/dist`. For development, you can run the Vite dev server separately: 69 70**Start Vite Dev Server:** 71 72```bash 73cd client 74npm run dev 75``` 76 77## Docker Deployment 78 79The project includes a multi-stage `Dockerfile` that builds both the React frontend and Go backend into a single production-ready image. 80 81```bash 82docker build -t boop-cat . 83docker run -p 8788:8788 --env-file .env boop-cat 84``` 85 86## API Documentation 87 88The platform provides a REST API for managing sites. See the **API Documentation** page within the dashboard for details and examples. 89 90## License 91 92This project is licensed under the Apache License 2.0. See [LICENSE](LICENSE) for details.