Repo polish: strip AI Studio scaffolding, add docs, tooling and CI - #1
Merged
Merged
Conversation
The repo was exported from AI Studio and still carried its harness: metadata.json (declaring a server-side Gemini capability the code never used), an .env.example documenting the AI Studio Secrets panel, and an assets/.aistudio/ directory. Also drops three committed avatar images totalling ~2.6 MB. Two were byte-identical copies of each other, the third had a generated timestamp filename, and none were referenced: every avatar in the app is served from a remote URL in avatarUtils.ts, where '/user_avatar.jpg' appears only as a sentinel value to reject. public/user_avatar.jpg was not even a valid JPEG. bun.lock goes too; the project is standardised on npm. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
package.json was still the untouched export: named "react-example" at version 0.0.0 with no description or license. Removes dependencies nothing imports: @google/genai (there is no AI code in the repo), express, dotenv, esbuild, autoprefixer (not needed under Tailwind v4), @types/express and tsx. Moves build-time packages out of "dependencies", and drops the duplicate vite entry that was listed in both dependency blocks. Renames the "lint" script to "typecheck" (it only ran tsc --noEmit) and adds real linting and formatting: ESLint 9 flat config with typescript-eslint, react-hooks and unused-imports, plus Prettier, .editorconfig and .nvmrc. vite.config.ts loses the AI Studio DISABLE_HMR handling and its comment telling the reader not to modify the file (which also contained a mojibake em dash), and gains manualChunks to split the vendor bundle. Adds a CI workflow running typecheck, lint, format check and build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mechanical reformat only, no behaviour change. Kept as its own commit so the functional changes that follow stay reviewable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fixes a latent type error: UserProfile.phone is read and written in five places in UserAccountModal but was never declared on the interface. Adds it as an optional field. Clears ~180 unused imports (mostly Lucide icons) and the dead local state behind them: useState pairs that were never read or set, computed values with no consumers, and destructured props no component used. Props stay on their interfaces so no call site changes; only the destructuring is trimmed. Empty catch bindings become optional catch bindings, and the two `any`s are replaced with real types. jspdf and qrcode now load through dynamic import at the point of use rather than at module scope. They are only needed when a voucher or QR code is actually generated, and together they were pulling ~600 kB into the initial bundle. Main chunk drops from 1226 kB to 660 kB (gzip: 362 kB to 178 kB). downloadUpcomingTripPdf becomes async; its single caller awaits it. Also drops the Apache-2.0 SPDX header AI Studio injected into App.tsx, which contradicted the project license. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The repo had no README and no license. Screenshots are captured from the running app at 1440x900. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Packaging pass over the repo. No product behaviour changes — the app renders and works exactly as before.
What's in here
Removed the Google AI Studio export harness.
metadata.jsondeclared a server-side Gemini capability,@google/genaiwas a dependency and.env.exampledocumented the AI Studio Secrets panel — but nothing insrc/imports@google/genaior readsGEMINI_API_KEY. Anyone grepping the repo would notice. All of it is gone, along withassets/.aistudio/, theDISABLE_HMRblock invite.config.ts, and the Apache-2.0 SPDX header injected intoApp.tsx.Deleted ~2.6 MB of dead images.
public/user_avatar.jpgandsrc/assets/user_avatar.jpgwere byte-identical; the third had a generated timestamp filename. None were referenced — every avatar comes from a remote URL inavatarUtils.ts, where/user_avatar.jpgappears only as a sentinel to reject.public/user_avatar.jpgwasn't even a valid JPEG (filereportsdata).Fixed a latent type error.
UserProfile.phoneis read and written in five places inUserAccountModalbut was never declared on the interface.Cleared ~180 unused imports (mostly Lucide icons) and the dead local state behind them. Props stay on their interfaces, so no call sites change.
Deferred the export dependencies.
jspdfandqrcodenow load via dynamicimport()at point of use. Main chunk: 1226 kB → 660 kB (gzip 362 kB → 178 kB).Fixed
package.json— was"react-example"at0.0.0. Dropped seven unimported dependencies, moved build-time packages out ofdependencies, removed the duplicateviteentry.Added tooling and CI — ESLint 9, Prettier,
.editorconfig,.nvmrc, and a workflow running typecheck / lint / format / build.Added README, screenshots and MIT license. The repo had none of the three.
Reviewing
The five commits are meant to be read in order.
style: format the codebase with Prettieris a pure mechanical reformat, kept separate sorefactor:stays readable at -280/+51.Verified locally
Clean
npm ci, then every CI step:npm run typechecknpm run lintexhaustive-depswarning)npm run format:checknpm run buildApp launched on
localhost:3000and exercised in the browser — the planner, vibe matching and destination grid all render correctly. The README screenshots are captured from that run.One thing for you to decide
The deck and the UI both lead with "AI" (the hero badge reads
WANDR AI TRAVEL EXPERIENCE PLATFORM), but there is no AI in the codebase —tripPlannerEngine.tsis deterministic scoring over a curated dataset. I left all UI and marketing copy untouched; that's your call, not a packaging fix. The README describes the engine as it actually works and lists LLM-backed intent parsing under Roadmap. Worth closing that gap in one direction or the other before showing this around.🤖 Generated with Claude Code