Update project configuration and database setup

- Added H2 in-memory database support, replacing PostgreSQL for local development.
- Updated application properties to reflect new database configuration.
- Modified Vite build output directory to integrate with Quarkus static resources.
- Enhanced entity classes to use @Lob for character and story descriptions, allowing for larger text storage.
- Updated development workflow documentation to reflect changes in database setup and prerequisites.
This commit is contained in:
Konrad Neitzel
2026-02-25 06:10:55 +01:00
parent 7302cc52a7
commit ee6e1c7cb1
13 changed files with 46 additions and 52 deletions
+4 -9
View File
@@ -4,7 +4,7 @@
- **Backend**: Quarkus 3.31.2 (Java 21, Maven).
- **Frontend**: React 18 + TypeScript + Vite in `src/main/web`.
- **Database**: PostgreSQL with Liquibase migrations.
- **Database**: H2 in-memory with Liquibase migrations (data resets on restart).
- **Auth**: SmallRye JWT with RSA key signing; BCrypt password hashing.
- **API Contract**: OpenAPI 3.0.3 at `src/main/resources/openapi/story-teller-api.yaml`.
- **Generated Code**:
@@ -13,13 +13,8 @@
### Local Setup
1. **Prerequisites**: JDK 21, Maven 3.9+, PostgreSQL, Node.js 22 (managed by frontend-maven-plugin).
2. **Database**: Create a PostgreSQL database:
```sql
CREATE DATABASE storyteller;
CREATE USER storyteller WITH PASSWORD 'storyteller';
GRANT ALL PRIVILEGES ON DATABASE storyteller TO storyteller;
```
1. **Prerequisites**: JDK 21, Maven 3.9+, Node.js 22 (managed by frontend-maven-plugin).
2. **Database**: H2 in-memory — no external DB setup required. Liquibase creates the schema and seeds the admin user automatically on each startup.
3. **Build everything**: `mvn package` (generates API code, compiles Java, builds frontend, runs tests).
4. **Run in dev mode**: `mvn quarkus:dev` (hot reload, frontend proxy at http://localhost:5173).
5. **Frontend dev**: `cd src/main/web && npm run dev` (standalone Vite dev server, proxies `/api` to Quarkus).
@@ -106,4 +101,4 @@ The AI step generation flow includes automatic context compaction:
- **JWT errors**: Ensure `privateKey.pem` and `publicKey.pem` exist in `src/main/resources/`.
- **Generated code issues**: Run `mvn clean generate-sources` to rebuild from scratch.
- **TypeScript errors**: Check that `src/main/web/node_modules` exists; run `npm install` in `src/main/web`.
- **DB connection**: Verify PostgreSQL is running and the `storyteller` database/user exist.
- **DB issues**: H2 in-memory resets on restart. If Liquibase fails, run `mvn clean` and restart.