Initial commit: installable PWA hello world
React + TypeScript + Tailwind v4 + shadcn/ui frontend (client), Express + better-sqlite3 backend (server) in a pnpm workspace. Includes vite-plugin-pwa manifest, service worker, and iOS install meta tags. GET /api/hello increments a visit counter in SQLite; backend serves the built client in production.
This commit is contained in:
47
README.md
Normal file
47
README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Pocket Pascal
|
||||
|
||||
A minimal, installable **Progressive Web App** that renders "Hello, World!" and
|
||||
reads/writes a visit counter in **SQLite** via a small Express backend.
|
||||
|
||||
- **Frontend:** Vite + React + TypeScript + Tailwind v4 + shadcn/ui
|
||||
- **Backend:** Express + TypeScript + better-sqlite3
|
||||
- **PWA:** installable on Android (Chrome) and iOS (Safari), works offline
|
||||
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open <http://localhost:5173>. The Vite dev server proxies `/api` to the backend on
|
||||
port 3001, and the visit counter increments on each load (proving the SQLite
|
||||
round-trip).
|
||||
|
||||
## Production / install test
|
||||
|
||||
```bash
|
||||
pnpm build
|
||||
pnpm start
|
||||
```
|
||||
|
||||
Open <http://localhost:3001> — the backend serves the built client. Use
|
||||
DevTools → Application → Manifest to confirm PWA installability, then
|
||||
"Add to Home Screen". (On a real device, off localhost, HTTPS is required.)
|
||||
|
||||
## Scripts
|
||||
|
||||
| Command | Description |
|
||||
| --------------- | ---------------------------------------------- |
|
||||
| `pnpm dev` | Run client + backend concurrently |
|
||||
| `pnpm build` | Build both packages |
|
||||
| `pnpm start` | Run the production backend (serves the client) |
|
||||
| `pnpm lint` | Lint all packages |
|
||||
| `pnpm typecheck`| Type-check all packages |
|
||||
|
||||
See [`AGENTS.md`](./AGENTS.md) for the full contributor guide.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Node.js >= 22
|
||||
- pnpm
|
||||
Reference in New Issue
Block a user