2026-05-17 14:31:48 +02:00

46 lines
2.9 KiB
Markdown

## Context
This is a new SvelteKit project that will serve as the foundation for an interactive Poker game and learning tool. The current state is an empty directory with no existing codebase. The project will use Svelte 5 with runes and SvelteKit 2.x+ as the framework.
## Goals / Non-Goals
**Goals:**
- Initialize a SvelteKit project with TypeScript support using `npx sv create`
- Configure the project with standard SvelteKit conventions (file structure, routing, aliases)
- Set up Git version control with initial commit and remote repository connection
- Establish a development-ready environment that can be extended incrementally
**Non-Goals:**
- Implementing poker game logic or UI components
- Adding third-party libraries or styling frameworks at this stage
- Setting up testing infrastructure (will be added later)
- Deployment configuration beyond the default adapter-auto setup
## Decisions
**Use `npx sv create` with TypeScript (`--types ts`)**
The official Svelte CLI is the recommended way to scaffold a SvelteKit project. TypeScript provides type safety for the complex data structures poker games require (hand evaluation, betting mechanics, player states). Using `.ts` files and `lang="ts"` in `.svelte` components ensures end-to-end type coverage.
**Use default adapter-auto**
The `@sveltejs/adapter-auto` adapter is chosen as the default since it auto-detects deployment targets. This keeps the initial setup minimal while remaining flexible for future deployment decisions. The poker game will likely run locally or on a Node.js server, but adapter-auto provides the best starting point without committing to a specific platform.
**Use `minimal` template**
The `minimal` template is preferred over `demo` since we need a clean slate to build the poker application from scratch. The demo template includes sample components and routes that would need to be removed anyway.
**Standard project structure**
Following SvelteKit conventions:
- `src/routes/` for page components
- `src/lib/` for shared utilities and components (poker logic, UI elements)
- `src/lib/server/` for server-only code (future authentication, database operations)
- `static/` for static assets
**Git workflow**
Initialize with a `main` branch and connect to the user's Gitea remote at `https://git.veit-fraenzer.de/veitR/PokeR.git`. This establishes version control from day one, enabling incremental feature development with proper tracking.
## Risks / Trade-offs
[TypeScript adds initial setup complexity] → Mitigated by following SvelteKit conventions and using the CLI template which handles configuration automatically.
[Empty project provides no immediate value] → This is foundational work; subsequent changes will add poker game features incrementally using the OpenSpec workflow.
[Default adapter may need replacement later] → Adapter can be changed in `svelte.config.js` without affecting application code, so this is a low-risk decision.