A modern, opinionated starter template for building fast, accessible, and AI-friendly web applications.
- Astro v5.5.5 - Modern web framework for building fast, content-focused websites
- React v19.0.0 - UI library for building interactive components
- TypeScript v5 - Type-safe JavaScript
- Tailwind CSS v4.0.17 - Utility-first CSS framework
- Supabase - Authentication and backend-as-a-service
- Node.js v22.14.0 (as specified in
.nvmrc) - npm (comes with Node.js)
- Clone the repository:
git clone https://github.com/przeprogramowani/10x-astro-starter.git
cd 10x-astro-starter- Install dependencies:
npm install-
Set up Supabase and configure environment variables — see Supabase Configuration below.
-
Run the development server:
npm run dev- Build for production:
npm run buildnpm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issues
.
├── src/
│ ├── layouts/ # Astro layouts
│ ├── pages/ # Astro pages
│ │ └── api/ # API endpoints
│ ├── components/ # UI components (Astro & React)
│ └── assets/ # Static assets
├── public/ # Public assetsThis project uses Supabase for authentication. Environment variables are declared via Astro's astro:env schema and are treated as server-only secrets — they are never exposed to the client.
Requires Docker and ~7 GB RAM.
- Create your
.envfile:
cp .env.example .env- Initialize the local Supabase project (creates a
supabase/config folder):
npx supabase init- Start the local stack (downloads Docker images on first run):
npx supabase start- Copy the credentials printed by the CLI into your
.env:
SUPABASE_URL=http://127.0.0.1:54321
SUPABASE_KEY=<anon key from CLI output>
- To stop the stack when done:
npx supabase stopThe local Studio UI is available at http://localhost:54323.
No database tables or migrations are required — this project uses Supabase Auth's built-in auth.users table only.
If you prefer to use a hosted Supabase project, add these variables to your .env file:
| Variable | Description |
|---|---|
SUPABASE_URL |
Project URL from Supabase dashboard → Settings → API |
SUPABASE_KEY |
anon public key from Supabase dashboard → Settings → API |
SUPABASE_URL=https://<project-ref>.supabase.co
SUPABASE_KEY=<anon-key>
By default Supabase requires email confirmation before a user can sign in. To skip this during local development:
- Open the Supabase dashboard for your project
- Go to Authentication → Email → Confirm email
- Toggle it off
Users can then sign in immediately after sign-up without clicking a confirmation link.
| Route | Description |
|---|---|
/auth/signin |
Email/password sign-in form |
/auth/signup |
Email/password sign-up form |
/auth/confirm-email |
Post-signup "check your inbox" page |
/dashboard |
Example protected page (redirects to /auth/signin if unauthenticated) |
Route protection is handled in src/middleware.ts. Add paths to the PROTECTED_ROUTES array there to require authentication.
This project is configured with AI development tools to enhance the development experience, providing guidelines for:
- Project structure
- Coding practices
- Frontend development
- Styling with Tailwind
- Accessibility best practices
- Astro and React guidelines
The project includes AI rules in .cursor/rules/ directory that help Cursor IDE understand the project structure and provide better code suggestions.
AI instructions for GitHub Copilot are available in .github/copilot-instructions.md
The .windsurfrules file contains AI configuration for Windsurf.
Please follow the AI guidelines and coding practices defined in the AI configuration files when contributing to this project.
MIT
