Skip to content

Mathieu#16

Merged
mathieusouflis merged 58 commits intomainfrom
mathieu
Dec 10, 2025
Merged

Mathieu#16
mathieusouflis merged 58 commits intomainfrom
mathieu

Conversation

@mathieusouflis
Copy link
Copy Markdown
Owner

No description provided.

Pauldatcom and others added 30 commits November 13, 2025 09:59
* .

* chore: docker setup WIP

* feat(devops): Setup docker

* feat(devops): Setup docker
Add docker-compose.dev.yaml and docker-compose.prod.yaml, remove the old
docker-compose.yaml and dockerfile.dev. Update dockerfile.prod to
install pnpm and run builds/start. Use nodemon for backend dev and add
start script; rename frontend preview to start. Add root NPM scripts to
manage the dev database and prod docker, and update pnpm lockfile.
Replace POSTGRES_/DATABASE_URL usage with
DB_USER/DB_PASSWORD/DB_NAME/DB_URL across docs, docker-compose files,
and scripts. Load .env.dev in drizzle.config and construct the DB URL
from DB_* variables. Add Drizzle meta snapshot and journal files.
Co-authored-by: mathieusouflis <39670015+mathieusouflis@users.noreply.github.com>
Move Drizzle schema into modules/tape and export via
modules/index.schemas Introduce PostgresClient and new TapeRepository
under modules/tape Update drizzle.config to point to
./src/modules/index.schemas.ts Remove legacy database
client/index/repository infra files Add TS path alias @/* in backend
tsconfig
Update backend package.json paths and dev/start scripts to point to
dist/src. Add a routes plugin and a TapeController (modules/tape),
registering the plugin at /api. Remove duplicate dotenv and duplicate
check-types entries in package.json.
Delete old tapes schema and add a new Drizzle table turing_machine with
updated columns and Zod validation. Rename content -> tape and
finalStates (array) -> finalState (string). Update transitions to use
moveDirection values "left" | "right" | "stop" instead of "L" / "R" and
export new TypeScript select/insert types plus TuringMachine Zod
schemas.
Replace the concrete TuringMachineInterface with an
ITuringMachineRepository and have TuringMachineRepository implement it
(create, get, getAll, update, delete). Inject the repository into
CreateTuringMachineUseCase. Update controller to bind route handlers,
validate create requests with NewTuringMachineRecordSchema, and return
proper 400/201 responses.
Inject DeleteUseCase, implement delete handler to execute the use case
and return 204. Wire DeleteUseCase into routes and convert controller
methods/registerRoutes to arrow functions to preserve this binding.
Add a build script and emit artifacts to dist with "type": "module",
main/types and package exports. Update tsconfig for NodeNext, enable
declarations/outDir and tighten includes. Update source export to use
".js" and make turbo dev depend on ^build.
Read repo root .env to determine NODE_ENV, load .env.dev or .env.prod,
and inject VITE_* and NODE_ENV into import.meta.env via Vite's define.
Set envDir to the repository root.

Add apps/frontend/src/config/api.config.ts exporting a typed apiConfig
with baseUrl (from VITE_API_URL or localhost) and turingMachine
endpoints.
Enable credentials, add PATCH method and Accept header for CORS. Update
frontend dotenv lookups to use apps/frontend relative paths. Remove
VITE_BACKEND_URL from .env.dev.example.
Implement create, delete, getById, run, step, and update functions;
export them from the TuringMachine module and add response error
handling to list
Parse JSON error bodies in create and surface error.message when present
Remove redundant await and inline error construction in step Add
temporary debug log when fetching list
Implement React Query hooks: useList, useGetById, useCreate, useDelete,
useRun, useStep. Hooks call apiClient.TuringMachine endpoints and update
the React Query cache (setQueryData, invalidateQueries, removeQueries)
using TAGS.
Use Radix Slot in Button, add asChild prop, and simplify variants,
sizes, and classNames. Simplify Card styling and rename CardPanel to
CardContent (removed alias)
Move homepage into a new folder and use it in the route. Fetch machines
with useUsers (list) and render TuringMachineCard for each item. Add
delete mutation and handle loading, error, and empty states.
Consolidate the delete button into CardAction and render mutation errors
inside the card so they remain visible without absolute positioning. Add
CardAction to imports.
@mathieusouflis mathieusouflis merged commit b8118cf into main Dec 10, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants