startupsystems

Setup Guide

Quick Start

1. Clone Repository

git clone https://github.com/Myopenai/startupsystems.git
cd startupsystems

2. Install Dependencies

npm install

3. Configure Environment

For Windows (PowerShell):

.\scripts\setup.ps1

For Linux/Mac:

chmod +x scripts/setup.sh
./scripts/setup.sh

4. Edit Configuration Files

Edit .dev.vars with your Cloudflare credentials:

ENVIRONMENT=development
CLOUDFLARE_API_TOKEN=your_token_here
CLOUDFLARE_ACCOUNT_ID=your_account_id_here

5. Login to Cloudflare

npx wrangler login

6. Start Development Server

npm run dev

7. Deploy to Production

npm run deploy

Cloudflare Workers Setup

Get Your API Token

  1. Go to https://dash.cloudflare.com/profile/api-tokens
  2. Click “Create Token”
  3. Use “Edit Cloudflare Workers” template
  4. Copy the token

Get Your Account ID

  1. Go to https://dash.cloudflare.com/
  2. Select your account
  3. Copy Account ID from right sidebar

GitHub Secrets (for CI/CD)

Add these secrets to your GitHub repository:

  1. Go to Settings → Secrets and variables → Actions
  2. Add:
    • CLOUDFLARE_API_TOKEN
    • CLOUDFLARE_ACCOUNT_ID

Verification

After deployment, check your worker:

Test endpoints:

Troubleshooting

Wrangler Not Found

npm install -g wrangler

Build Errors

npm run lint
npm run build

Authentication Issues

npx wrangler logout
npx wrangler login