Skip to content

Initialize Express/React scaffolding#2

Open
TheShahnawaaz wants to merge 3 commits into
database-lldfrom
codex/understand-project-structure-and-components
Open

Initialize Express/React scaffolding#2
TheShahnawaaz wants to merge 3 commits into
database-lldfrom
codex/understand-project-structure-and-components

Conversation

@TheShahnawaaz
Copy link
Copy Markdown
Owner

Summary

  • scaffold Express backend with Supabase-aware config plus booking, mock payment, admin demand, and QR scan routes
  • set up Vite + React frontend with shadcn-inspired UI sections for students, drivers, and admins
  • add repo-level README, gitignore, and environment examples for both services

Testing

  • npm run build (frontend)

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/index.js
Comment on lines +10 to +13
import scansRouter from './src/routes/scans.js';
import { loadConfig } from './src/utils/config.js';

dotenv.config();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Load .env before importing routes

In backend/index.js the route modules are imported (lines 6–10) before dotenv.config() runs on line 13, but each route module calls loadConfig() at module scope. Because ES module imports execute before the body of this file, those loadConfig() calls see only the bare process environment, so .env values for admin credentials, payment mock mode, and trip timing are silently ignored and defaults are used. Running the API with a .env file will therefore authenticate against admin@example.com/changeme and always enable mock payments regardless of the intended configuration.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant