ci) add gitea actions and refresh readme
Some checks failed
PR Checks / lint-test-and-docker-build (pull_request) Failing after 1m42s
Some checks failed
PR Checks / lint-test-and-docker-build (pull_request) Failing after 1m42s
This commit is contained in:
100
README.md
100
README.md
@@ -1,35 +1,97 @@
|
||||
# sv
|
||||
# trips
|
||||
|
||||
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
|
||||
A SvelteKit travel planning app for managing trips, travelers, transportation, lodgings, package tours, checklists, and experiences.
|
||||
|
||||
## Creating a project
|
||||
## Tech Stack
|
||||
|
||||
If you're seeing this, you've probably already done this step. Congrats!
|
||||
- SvelteKit + TypeScript
|
||||
- SQLite (`better-sqlite3`)
|
||||
- Vitest for unit tests
|
||||
- ESLint + Prettier for code quality
|
||||
- Bun for local/deploy build workflows
|
||||
- Docker multi-stage build for production image
|
||||
|
||||
## Features
|
||||
|
||||
- Authenticated trip dashboard with upcoming/past trip views
|
||||
- Trip planning with:
|
||||
- flights
|
||||
- private vehicles
|
||||
- other transportation
|
||||
- lodgings
|
||||
- package tours
|
||||
- checklists
|
||||
- experiences
|
||||
- Admin flows for travel reference data and tour operator/tour management
|
||||
|
||||
## Local Development
|
||||
|
||||
### Requirements
|
||||
|
||||
- Bun 1.x
|
||||
- Node.js 22+ (runtime target)
|
||||
|
||||
### Setup
|
||||
|
||||
```sh
|
||||
# create a new project
|
||||
npx sv create my-app
|
||||
cp .env.example .env
|
||||
bun install
|
||||
```
|
||||
|
||||
## Developing
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
### Run
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create a production version of your app:
|
||||
## Quality and Tests
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
bun run lint
|
||||
bun run test
|
||||
bun run check
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
## Build and Preview
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
||||
```sh
|
||||
bun run build
|
||||
bun run preview
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
### Build locally
|
||||
|
||||
```sh
|
||||
docker build -t trips:local .
|
||||
```
|
||||
|
||||
### Run locally
|
||||
|
||||
```sh
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
The container stores SQLite data at `/data/trips.db` (mounted as the `trips-data` volume in `docker-compose.yml`).
|
||||
|
||||
## CI (Gitea Actions)
|
||||
|
||||
Workflows live in `.gitea/workflows`:
|
||||
|
||||
- `pr-checks.yml`: runs lint, tests, and Docker build on pull requests.
|
||||
- `main-image.yml`: builds and pushes a Docker image on push to `main`.
|
||||
|
||||
### Registry secrets for image publish
|
||||
|
||||
Configure these repository secrets in Gitea:
|
||||
|
||||
- `REGISTRY_USERNAME`
|
||||
- `REGISTRY_PASSWORD`
|
||||
|
||||
By default, the publish workflow pushes to:
|
||||
|
||||
- `git.campbellwireless.net/<owner>/<repo>:latest`
|
||||
- `git.campbellwireless.net/<owner>/<repo>:<short-sha>`
|
||||
|
||||
If your registry host differs, edit `REGISTRY_HOST` in `.gitea/workflows/main-image.yml`.
|
||||
|
||||
Reference in New Issue
Block a user