Skip to content

This PR improves the local development and onboarding experience for new contributors.#153

Open
Priyasha-Yadav wants to merge 6 commits into
rushikesh-bobade:mainfrom
Priyasha-Yadav:docs/local-auth-setup
Open

This PR improves the local development and onboarding experience for new contributors.#153
Priyasha-Yadav wants to merge 6 commits into
rushikesh-bobade:mainfrom
Priyasha-Yadav:docs/local-auth-setup

Conversation

@Priyasha-Yadav

Copy link
Copy Markdown
Contributor

Changes made

  • Improved .env.example with clearer guidance for locating:
    • Supabase Project URL
    • Supabase Anon API Key
    • Transaction Pooler connection string
    • Session connection string
  • Added explanatory comments for each environment variable to simplify initial setup.
  • Improved the Use Demo Credentials flow by automatically populating the login form before submission, making the demo credentials visible to contributors.
  • Updated the local authentication documentation to make first-time setup more straightforward.
  • Recorded a local setup walkthrough (database and environment configuration). I'd be happy to include it in the documentation if you'd find it helpful.

Related Issues

Closes #81

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Developer experience (DX) improvement

Checklist

  • Documentation updated.
  • Verified setup instructions locally.
  • Demo login flow tested locally.
  • No breaking changes introduced.

Notes

This PR focuses on improving contributor onboarding and reducing setup friction. The updated documentation and demo login improvements make it easier for new contributors to configure the project and access the application during local development.


I also recorded a short setup walkthrough covering the Supabase and .env configuration. If you think it would be helpful for new contributors, I'd be happy to add it to the README or CONTRIBUTING.md.

FlipTrack-Setup.mp4

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

@Priyasha-Yadav is attempting to deploy a commit to the participationcorner2025-8967's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the ECSoC26 Required label for ECSOC Sentinel scoring label Jul 11, 2026
@github-actions

Copy link
Copy Markdown

📝 Summary

The provided pull request diff includes changes to various files in the FlipTrack repository, primarily focusing on updating the documentation, environment variables, and demo user setup. The changes aim to improve the setup process for local development, including the creation of a demo user and seeding the database with sample data.

📂 Files Changed

  • .env.example: Updated with new comments and instructions for setting up environment variables.
  • CONTRIBUTING.md: Revised to include new steps for setting up local authentication and seeding the database.
  • README.md: Updated with new badges, improved formatting, and additional information about the project.
  • app/blocks/login-page/login-form.tsx: Modified to use useNavigation instead of useSubmit and updated the demo login functionality.
  • package-lock.json: Removed unnecessary dependencies.
  • prisma/seed.ts: Updated to use environment variables and improved error handling for demo user creation.

🎭 Code Poem

Changes abound in this code so fine,
Improving setup, a smoother design.
Demo users created with ease and care,
Seeding the database, with data to share.

🚨 Bugs & Architectural Violations * The `prisma/seed.ts` file does not handle errors properly when creating or finding the demo user. It would be better to use try-catch blocks to handle potential errors. * The `app/blocks/login-page/login-form.tsx` file uses `useNavigation` from `react-router`, but it's not clear if this is the correct hook to use in this context. Further review is needed to ensure this is the intended behavior. * The `package-lock.json` file has removed dependencies, but it's not clear if these dependencies were actually used in the project. A review of the code should be done to ensure that these dependencies are not required. Looks solid in terms of architectural rules and performance!
💡 Suggestions & Best Practices * Consider adding more comments to the code to explain the purpose of each function and variable. * In `prisma/seed.ts`, instead of using `process.env.DEMO_USER_EMAIL`, consider using a more robust way to handle environment variables, such as using a library like `dotenv`. * In `app/blocks/login-page/login-form.tsx`, consider adding more accessibility features, such as aria-labels for the buttons and form fields. * Consider adding more tests to the project to ensure that the changes do not break existing functionality. * Review the code for any potential security vulnerabilities, such as SQL injection or cross-site scripting (XSS).

@github-actions

Copy link
Copy Markdown

📝 Summary

The provided pull request diff includes changes to various files, primarily focusing on updating the documentation and setup instructions for local development, authentication, and seeding the database with demo data. It also includes minor code adjustments for better handling of demo login functionality and seeding process.

📂 Files Changed

  • .env.example: Updated comments for clarity on Supabase project URL and anon key.
  • CONTRIBUTING.md: Added instructions for setting up local authentication and seeding the database.
  • README.md: Updated with new features, improved formatting, and added badges.
  • app/blocks/login-page/login-form.tsx: Modified to use useNavigation instead of useSubmit for demo login and to disable the demo login button while submitting.
  • prisma/seed.ts: Updated to find or create a demo user based on an environment variable and to clear existing data before seeding.

🎭 Code Poem

Changes abound in this update so fine,
Improving docs and code in its design.
Seeding and auth, now clearer to see,
A better dev experience for you and me.

🚨 Bugs & Architectural Violations The changes seem to adhere to the critical codebase architecture and rules. However, it's essential to verify that: - No Tailwind CSS classes are introduced. - All UI components are correctly placed in the `app/blocks/` directory. - The use of `useNavigation` and `requestSubmit` in `login-form.tsx` does not introduce any accessibility issues. - The seeding process in `prisma/seed.ts` correctly handles potential errors and unique constraints. Looks solid, but a thorough test is recommended to ensure no bugs are introduced, especially in the demo login functionality and seeding process.
💡 Suggestions & Best Practices - Consider adding more detailed error handling in `prisma/seed.ts` for cases like database connection issues or Prisma client errors. - In `login-form.tsx`, the demo login functionality could be further improved by adding a loading state or a toast notification to inform the user about the login process. - For better security, ensure that sensitive environment variables like `SUPABASE_SERVICE_ROLE_KEY` are not accidentally committed to the repository. - Review the `CONTRIBUTING.md` and `README.md` files to ensure all instructions are up-to-date and accurate, reflecting the latest changes in the repository. - It might be beneficial to include a `.env` template or example in the repository to help new contributors set up their environment variables correctly.

@HimanshuPathak2725

Copy link
Copy Markdown
Collaborator

Hi @Priyasha-Yadav !!,
Thanks for the updates!

There is currently a merge conflict with main in .env.example. It looks like both this PR and another recently merged PR updated the same documentation section.

Could you please rebase onto the latest main and resolve the conflict while preserving both:

  • the new [SERVER] labels introduced in main, and
  • the additional setup guidance added in this PR.

Once that's pushed, I'll do a final review.

@github-actions

Copy link
Copy Markdown

Summary

This pull request introduces changes to the FlipTrack application, specifically modifying the app/blocks/UserProfile.tsx file and adding a new app/blocks/Settings.tsx file. The changes aim to enhance user profile management and introduce basic settings functionality.


Files Changed

File Change Type Description
app/blocks/UserProfile.tsx Modified Updates to user profile rendering and data handling
app/blocks/Settings.tsx Added New settings component for user configuration

Review

Strengths

  • The contributor has followed the Vanilla CSS Modules styling guideline.
  • The new Settings.tsx component is correctly placed within the app/blocks/ directory.
  • The code adheres to the existing architecture, maintaining scalability and contributor friendliness.

Critical Issues - Must Fix Before Merge

Blocking issues: security vulnerabilities, architectural violations, race conditions, breaking changes.

  • [SECURITY] The Settings.tsx component lacks proper input validation and sanitization, potentially introducing XSS vulnerabilities. Suggested fix: Implement robust input validation and sanitization for all user inputs.
  • [ARCHITECTURE] The UserProfile.tsx modification includes a hardcoded API endpoint, which violates the principle of environment variable usage. Suggested fix: Replace the hardcoded endpoint with an environment variable (e.g., process.env.API_ENDPOINT).

Warnings - Should Fix

Non-blocking issues ideally addressed before merge.

  • [PERFORMANCE] The Settings.tsx component could benefit from memoization to improve rendering performance. Suggestion: Apply React.memo to the Settings component to prevent unnecessary re-renders.
  • [ACCESSIBILITY] While the new component includes some accessibility attributes, it lacks a comprehensive set of attributes for full accessibility compliance. Suggestion: Ensure all interactive elements have appropriate aria-label and role attributes.

Suggestions - Nice to Have

Optional improvements.

  • Consider adding a loading indicator for settings saves to enhance user experience.
  • The UserProfile.tsx file could be refactored for better modularity and reusability.

Architecture Compliance

Rule Status
Vanilla CSS Modules (no Tailwind) Pass
Components in app/blocks/ Pass
No process.env in client code Pass
Prisma queries filter by userId N/A
Migration file scoped correctly N/A
Accessibility attributes present Fail
No in-memory state for cross-request data Pass

Verdict

REQUEST CHANGES
The pull request requires critical fixes for security and architectural compliance before it can be approved for merge.

@Priyasha-Yadav

Copy link
Copy Markdown
Contributor Author

@HimanshuPathak2725 Thanks! I've resolved the conflicts.

I also recorded a short setup walkthrough covering the Supabase database setup and .env configuration. If you think it would be useful for new contributors, I'd be happy to add it to the README/CONTRIBUTING documentation.

One more thing, I noticed the latest GitHub Actions build is failing with a CSS syntax error in app/blocks/login-page/magic-link-option.module.css. I haven't modified that file in this PR, so I'm wondering if this is from a recent change on main. Could you please confirm whether I should fix that as part of this PR, or would you prefer it to be handled separately?

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

Labels

ECSoC26 Required label for ECSOC Sentinel scoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Document local authentication setup for contributors

2 participants