Alpha One Labs is an education platform designed to facilitate both learning and teaching. The platform provides a comprehensive environment where educators can create and manage courses, while students can learn, collaborate, and engage with peers. With features like study groups, peer connections, and discussion forums, we aim to create a collaborative learning environment that goes beyond traditional online education.
- Frontend: HTML,Tailwind CSS
- Backend: Python (Cloudflare Worker)
- Database: Cloudflare D1 (SQLite)
Make sure you have installed:
- Node.js
- Wrangler CLI
Install Wrangler:
npm install -g wranglergit clone https://github.com/alphaonelabs/learn.git
cd learnwrangler login- Create Database:
wrangler d1 create education_db- Add the generated database_id to your wrangler.toml:
[[d1_databases]]
binding = "DB"
database_name = "education_db"
database_id = "YOUR_DATABASE_ID"- Apply Schema:
wrangler d1 execute education_db --file=schema.sqlThis project requires environment variables for encryption and authentication.
- For Local Development
Create a .dev.vars file in the project root:
ENCRYPTION_KEY=your-dev-encryption-key
JWT_SECRET=your-dev-jwt-secret
SENTRY_DSN=your-sentry-dsn
- For Production Use Wrangler secrets:
wrangler secret put ENCRYPTION_KEY
wrangler secret put JWT_SECRET
wrangler secret put SENTRY_DSNOr upload all values from an env file after verifying the active Cloudflare account:
./scripts/upload-vars.sh .env.production --account-id YOUR_ACCOUNT_IDTo run with no arguments, add your account ID to .env.production:
CLOUDFLARE_ACCOUNT_ID=YOUR_ACCOUNT_ID
Then run:
./scripts/upload-vars.shYou can also verify by account name:
./scripts/upload-vars.sh .env.production --account-name "Your Account Name"Optional Sentry tuning secrets:
wrangler secret put SENTRY_TRACES_SAMPLE_RATE
wrangler secret put SENTRY_ENVIRONMENT
wrangler secret put SENTRY_RELEASEwrangler devBackend server starts at:
http://127.0.0.1:8787- Open directly
public/index.html- Use a local server
npx serve publicFrontend Server will start at:
http://localhost:3000