Feedback App
A modern anonymous feedback application built with SvelteKit, Cloudflare Workers, and Drizzle ORM.
Features
- π Anonymous feedback collection
- β‘ Real-time feedback management
- π Authentication via One Time Password or Single-Sign On
- π§ Email notifications via Resend
- ποΈ SQLite (Local Dev) / Cloudflare D1 (Production) database with Drizzle ORM
- βοΈ Deployed on Cloudflare Workers
- π Error monitoring with Sentry
- π TypeScript support
- π§ͺ TODO:Comprehensive testing suite
Tech Stack
- Framework: SvelteKit
- Runtime: Cloudflare Workers
- Database: SQLite (Local Dev) / Cloudflare D1 (Production) with Drizzle ORM
- Authentication: Better Auth
- Email: Resend
- Styling: TailwindCSS with svelte-shadcn
- TODO:Testing: Vitest + Playwright
- Monitoring: Sentry
Prerequisites
- Node.js 18+
- Yarn package manager
- Cloudflare account (for deployment)
ποΈ Developing
- Clone the repository and install dependencies:
yarn install
Configure the required environment variables
Set up the database:
yarn db:migrate
yarn db:seed
- Start the development server:
yarn dev
# or start the server and open the app in a new browser tab
yarn dev --open
π’ Building
To create a production version of your app:
yarn build
You can preview the production build with yarn preview
.
TODO:π§ͺ Testing
Run unit tests:
yarn test:unit
Run end-to-end tests:
yarn test:e2e
Run all tests:
yarn test
ποΈ Database Management
- Push schema changes:
yarn db:push
- Generate migrations:
yarn db:generate
- Run migrations:
yarn db:migrate
- Open database studio:
yarn db:studio
- Seed database:
yarn db:seed
π Deployment
Deploy to Cloudflare Workers:
yarn deploy
βοΈ Environment
βοΈ Cloudflare Variables
For local development put these in .dev.vars
AUTH_AUTH0_ID
AUTH_AUTH0_SECRET
AUTH_SECRET
AUTH_MAX_AGE=86400
RESEND_API_KEY
[email protected]
π Sentry Config
To upload source maps during yarn build
put this in .env.sentry-build-plugin
SENTRY_AUTH_TOKEN
SENTRY_ORG=jmidd-dev
SENTRY_PROJECT=feedback-app
π§ Non-Secret Variables
These go in your .env
DATABASE_URL=file:local-tenant.db
DISABLE_EMAIL=true
π Documentation
Additional documentation can be found in the /docs
directory:
- Code Formatting: Biome
- Type Checking:
yarn check
- Cloudflare Types:
yarn cf-typegen
- Auth Schema Generation:
yarn auth:schema
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
yarn test
- Submit a pull request
TODO:π License
[Add your license information here]
```