Skip to content

indyhackers/indyhackers-redux

Repository files navigation

indy-hackers-redux

This template should help get you started developing with Vue 3 in Vite.

Recommended IDE Setup

VSCode + Volar (and disable Vetur).

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Run End-to-End Tests with Playwright

# Install browsers for the first run
npx playwright install

# When testing on CI, must build the project first
npm run build

# Runs the end-to-end tests
npm run test:e2e
# Runs the tests only on Chromium
npm run test:e2e -- --project=chromium
# Runs the tests of a specific file
npm run test:e2e -- tests/example.spec.ts
# Runs the tests in debug mode
npm run test:e2e -- --debug

Lint with ESLint

npm run lint

Some neat things

  • docker-compose sets developmentmode, build arg in Dockerfile defaults to production
  • which a pocketbase entry hook detects and moves all pocketbase hooks hook.pb.js.dev => hook.pb.js in dev env
    • hooks with the dev prefix aren't installed in production (as they exfiltrate data potentially)
  • while using docker-compose, you can add new test records using the pocketbase admin UI (user admin@indyhackers.org and password in pb/migrations/1726527259_add_admin.js)
  • the pocketbase auto-migrate feature will create migrations in pb/migrations when you update the schema in the admin UI
  • adding records is done by export-mocks and import-mocks subcommands
    • you can: docker exec -it pocketbase /usr/local/bin/pocketbase --hooksDir /pb_hooks --dir /pb_data export-mocks to dump the existing data records
    • I might be able to do this automatically, but for now if you want to commit the new mock state cp pb/hooks/mocks.json src/mocks/mocks.json and add to git
    • can manually run the importer with the import-mocks subcommand
  • for now ignore .dev extension removals in git when time to commit

this should allow us to rapidly prototype our schemas and test data in a reliable fashion

About

The hot new 2025 Indyhackers.org Web Site

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5