A starter template for building web applications with:
Clone this repository
Install dependencies:
npm install
Set up CockroachDB:
CREATE DATABASE starter;
postgresql://username:[email protected]:26257/starter?sslmode=verify-full
Create a .env
file based on .env.example
:
cp .env.example .env
Configure your environment variables:
NUXT_PUBLIC_GOOGLE_CLIENT_ID
: Google OAuth client ID (create one at Google Cloud Console)DATABASE_URL
: Your CockroachDB connection string from step 3For local development with HTTPS (required for Google OAuth), generate certificates:
mkcert localhost
This will create localhost.pem
and localhost-key.pem
in the root directory.
Run the database migrations:
npm run db:migrate
Start the development server:
npm run dev
To apply all pending migrations:
npm run db:migrate
To create a new migration:
npm run db:create-migration your-migration-name
This creates a new migration file in the migrations/sql
directory.
assets/
- Static assets and CSScomponents/
- Vue componentslayouts/
- Page layoutsmiddleware/
- Route middlewaremigrations/
- Database migrationspages/
- Application pages and routespublic/
- Public static filesserver/
- Server-side codeapi/
- API endpointsutils/
- Server utilitiesstores/
- Pinia storestypes/
- TypeScript type definitionsutils/
- Utility functionshttps://localhost:3000
(for local development)https://localhost:3000
(for local development)NUXT_PUBLIC_GOOGLE_CLIENT_ID
in your .env
file