An open API service indexing awesome lists of open source software.

https://github.com/7ph/website-starter-pack

The ultimate Nuxt/FastAPI web application starter pack with user management, stripe subscriptions
https://github.com/7ph/website-starter-pack

boilerplate fastapi nuxt saas-starter stripe

Last synced: about 2 months ago
JSON representation

The ultimate Nuxt/FastAPI web application starter pack with user management, stripe subscriptions

Awesome Lists containing this project

README

          

# website-starter-pack

## Install

Ensure you have `git` and `docker` on your machine, then:

- Ensure you are running as a non-root user (highly recommended)
- Clone the repository
- Execute `npm run setup`
- Fill the `.env` file

## OAuth (Google Sign-In)

To enable "Continue with Google" on the login page:

1. **Create OAuth credentials** in [Google Cloud Console](https://console.cloud.google.com/apis/credentials):

- Go to "Credentials" → "Create Credentials" → "OAuth client ID"
- Application type: "Web application"
- Add authorized redirect URIs:
- Production: `https://YOUR_DOMAIN/oauth/callback`
- Local dev: `http://localhost:3000/oauth/callback` (Google only allows plain `localhost`, not custom `.localhost` domains)

2. **Configure environment variables** in `.env`:
```
OAUTH_ENABLED=true
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
```

The Google sign-in button will appear on the login and signup pages when properly configured.

## Running

For running in production, run `npm start`

For usual development (Nuxt debugger, frontend and backend hot-reload):

- Run `npm run dev`

For debugging the python process inside the backend container:

- Ensure you are using VSCode
- Run `npm run debug`
- In the VSCode Debugger Tab, execute the action `Debug Backend`

## Database

### Backup

To backup the database:

- Run `npm run db-dump`
- Verify the generated SQL file in `backups/`

To restore a backup:

- Delete database data folder with `sudo rm -rf services/db/data/ && npm run setup` (⚠️)
- Run `npm run db-restore -- backups/.sql.gz`

### Initial state

To ensure new databases automatically start from a specific backup:

- Delete database data folder with `sudo rm -rf services/db/data/ && npm run setup` (⚠️)
- Move the backup from `backups/*.sql.gz` to `services/db/initdb.sql`

Beware that `initdb.sql` is tracked by Git.