Skip to content

Latest commit

 

History

History
87 lines (64 loc) · 2.35 KB

File metadata and controls

87 lines (64 loc) · 2.35 KB

Contributing to Les Dauphins Portal

Getting Started

  1. Clone the repo and install dependencies:

    git clone https://github.com/Data-ScienceTech/portal-lesdauphins.git
    cd portal-lesdauphins
    npm install
  2. Copy the environment file and fill in your Supabase credentials:

    cp .env.example .env
  3. Start the dev server:

    npm run dev

Branch Strategy

  • main — production branch, auto-deploys to Netlify on every push
  • Feature branches — create from main, merge via pull request

Naming Convention

feature/invoice-list
fix/login-redirect
docs/update-readme

Commit Messages

Use clear, imperative-mood messages:

Add invoice list page with pagination
Fix language switcher not persisting selection
Update Supabase schema for parking spaces

Pull Requests

  1. Create a feature branch from main
  2. Make your changes, ensure npm run build passes
  3. Push and open a PR against main
  4. The PR description should explain what and why
  5. GitHub Actions will build the project on every PR push

Code Style

  • TypeScript — all React components use .tsx
  • Tailwind CSS — utility-first, use the ocean theme variables defined in src/index.css
  • Bilingual — all user-facing text must go through useLanguage().t(), with keys in both FR and EN in LanguageContext.tsx
  • Components — pages go in src/pages/, reusable components in src/components/

Project Architecture

Directory Purpose
src/pages/ Route-level page components
src/contexts/ React contexts (Auth, Language)
src/lib/ Library config (Supabase client)
src/components/ Shared UI components (to be created)

Environment & Secrets

  • Never commit .env — it's in .gitignore
  • Production secrets are stored in GitHub Actions secrets and Netlify environment variables
  • The Supabase anon key is public by design (protected by RLS policies)
  • Never expose the service role key in client code

Database Changes

  1. Write your SQL migration
  2. Test it against a dev Supabase project
  3. Add the migration file to the repo root
  4. Document the change in your PR

Need Help?

  • Check docs/ for project specifications and user stories
  • Review existing code in src/pages/ for patterns
  • Open an issue on GitHub for questions