Compare commits

...

3 Commits

Author SHA1 Message Date
Adriano Belisario
6c8e11c851 chore: db snapshot with updated item images
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
2026-05-03 23:14:23 +00:00
Adriano Belisario
7ef1065971 fix: hide item count when reservations are disabled 2026-05-03 23:14:17 +00:00
Adriano Belisario
9f6a7c15d9 docs: add repository contributor guide 2026-05-03 23:14:11 +00:00
3 changed files with 40 additions and 4 deletions

34
AGENTS.md Normal file
View File

@@ -0,0 +1,34 @@
# Repository Guidelines
## Project Structure & Module Organization
This repository contains the Next.js application for the Chadebebe wishlist site. App Router routes live in `app/`, including public wishlist pages in `app/[slug]/`, admin screens in `app/admin/`, and API handlers in `app/api/`. Shared UI belongs in `components/`, while server utilities, auth, database access, and scraping helpers live in `lib/`. Drizzle and SQLite data are under `lib/db/` and `data/db/`. Static assets are in `public/`; uploaded runtime assets are stored in `data/uploads/`. Deployment configuration is in the parent project root at `/home/adriano/chadebebe/docker-compose.yaml`, which builds this `src/` directory.
## Build, Test, and Development Commands
Run commands from `src/` unless noted.
- `npm install`: install local dependencies.
- `npm run dev`: start Next.js locally on port `3000`.
- `npm run build`: create the production Next.js standalone build.
- `npm run lint`: run the configured Next.js ESLint command.
- `npm run db:migrate`: apply Drizzle migrations.
- `npm run db:studio`: open Drizzle Studio for database inspection.
- `npm run guest:create -- --name="Name"`: create a guest access token.
- From `/home/adriano/chadebebe`, `docker compose up -d --build`: rebuild and redeploy the production container.
## Coding Style & Naming Conventions
Use TypeScript, React function components, and the App Router conventions already present in `app/`. Keep indentation at two spaces. Prefer descriptive camelCase for variables/functions, PascalCase for components, and lowercase route directory names. Keep UI copy in Portuguese for user-facing screens. Use Tailwind CSS utility classes for styling and follow existing component patterns before introducing new abstractions.
## Testing Guidelines
There is currently no dedicated test framework or `npm test` script. For changes, run `npm run build` at minimum; use `npm run lint` when dependencies are available. For database or reservation changes, manually exercise the relevant public wishlist and admin flows, including quantity limits, claim/unclaim behavior, and guest-token access.
## Commit & Pull Request Guidelines
Recent history mostly uses Conventional Commit prefixes, such as `feat:`, `fix:`, `docs:`, and `chore:`. Use concise imperative messages, for example `fix: hide disabled reservation action`. Pull requests should include a short summary, verification steps, linked issue if applicable, and screenshots for UI changes. Note any database snapshot or migration changes explicitly.
## Security & Configuration Tips
Do not commit real admin tokens or secrets. Admin access is controlled by `ADMIN_TOKEN`; production deployment also depends on Traefik labels and the external `web` Docker network. Treat `data/db/wishlist.db` as a snapshot and checkpoint SQLite before committing database updates.

View File

@@ -180,11 +180,13 @@ function PublicWishlistContent() {
)} )}
{/* Controls */} {/* Controls */}
{siteSettings.claimingEnabled && (
<div className="mb-6 flex items-center justify-end"> <div className="mb-6 flex items-center justify-end">
<div className="text-sm text-gray-600 dark:text-gray-400"> <div className="text-sm text-gray-600 dark:text-gray-400">
{filteredItems.length} de {items.length} itens {filteredItems.length} de {items.length} itens
</div> </div>
</div> </div>
)}
{/* Items List */} {/* Items List */}
{filteredItems.length === 0 ? ( {filteredItems.length === 0 ? (

Binary file not shown.