Merged
Conversation
* . * 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.