mirror of
https://github.com/NicholaiVogel/dashore-incubator.git
synced 2026-03-31 06:40:32 +00:00
- add WorkOS AuthKit authentication with middleware protection - add dashboard with sidebar layout (shadcn/ui components) - add contributor documentation (CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, START-HERE, Documentation/) - add CI workflow for lint and build on PRs - switch from pnpm to bun - add CLAUDE.md and AGENTS.md for AI assistant context
3.9 KiB
3.9 KiB
Start Here
get up and running with dashore incubator development in 5 minutes.
prerequisites
required:
- bun 1.0+ - bun.sh (
curl -fsSL https://bun.sh/install | bash) - node.js 18+ - nodejs.org (bun handles most things, but some tools need node)
- git - for version control
optional:
- wrangler cli - for cloudflare deployment (
bun add -g wrangler)
quick start
- clone and setup
# clone the repository (or your fork)
git clone https://github.com/dashore-incubator/dashore-incubator.git
cd dashore-incubator
# install dependencies
bun install
- configure environment
# copy the example env file
cp .env.example .env.local
# edit .env.local with your values:
# - WORKOS_CLIENT_ID (from WorkOS dashboard)
# - WORKOS_API_KEY (from WorkOS dashboard)
# - WORKOS_COOKIE_PASSWORD (32+ random characters)
if you don't have WorkOS credentials, you can still run the app - you just won't be able to authenticate.
- start development
# start the dev server with turbopack
bun dev
- open in browser
navigate to http://localhost:3000 - you should see the login page!
project structure
dashore-incubator/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API routes (auth callbacks)
│ │ ├── dashboard/ # Dashboard pages
│ │ ├── actions/ # Server actions
│ │ └── page.tsx # Login page
│ ├── components/ # React components
│ │ ├── ui/ # shadcn/ui base components
│ │ └── ... # App-specific components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utilities and helpers
│ └── middleware.ts # Auth middleware
├── Documentation/ # Contributor docs
├── .github/ # GitHub workflows
├── CLAUDE.md # AI assistant context
└── wrangler.jsonc # Cloudflare config
key commands
# development
bun dev # start dev server with turbopack (port 3000)
bun run lint # run eslint
# cloudflare
bun run preview # build and preview on cloudflare runtime
bun run deploy # build and deploy to production
troubleshooting
"module not found" errors
# clear node_modules and reinstall
rm -rf node_modules .next
bun install
turbopack issues
# try without turbopack
bun run dev --no-turbo
auth not working
- check your
.env.localhas all required vars - ensure WORKOS_COOKIE_PASSWORD is 32+ characters
- check the browser console for errors
build fails on cloudflare preview
# make sure opennext is building correctly
bun run build
# then try preview again
bun run preview
key files
| Purpose | File |
|---|---|
| Main page (login) | src/app/page.tsx |
| Dashboard | src/app/dashboard/page.tsx |
| Auth middleware | src/middleware.ts |
| Auth callback | src/app/api/auth/[...authkit]/route.ts |
| Sign out action | src/app/actions/auth.ts |
| Sidebar component | src/components/app-sidebar.tsx |
| UI components | src/components/ui/ |
development workflow
branch strategy
never push to main. always work on feature branches:
git checkout -b <username>/<feature-name>
# example
git checkout -b nicholai/add-settings-page
making changes
- create a feature branch
- make your changes
- run
bun run lintto check for issues - test with
bun run preview(cloudflare runtime) - commit with conventional commits
- open a PR
next steps
- explore the codebase - start with
src/app/page.tsx - read CLAUDE.md - understand the project context and conventions
- check issues - find something to work on
- join discord - ask questions, get help
welcome to the team!