Skip to content

vgandhi1/SmartFound

Repository files navigation

SmartFound

Industry 4.0 job board connecting IT/OT engineering roles with hard-tech employers.

SmartFound demo

Docs


Dev vs production (at a glance)

Development (local) Production
Code runs on Your machine Vercel (frontend), GitHub Actions (scraper), Supabase Cloud (DB + Auth + API)
Database & API npm run db:starthttp://127.0.0.1:54321 https://<project-ref>.supabase.co
Frontend env frontend/.env.local (gitignored) Vercel Environment Variables
Scraper env scraper/.env (gitignored) GitHub Secrets + scheduled workflow
Auth emails Mailpit at port 54324 Real SMTP via Supabase Auth

Local development

Prerequisites

  • Node.js 18+, npm
  • Docker Desktop (or Docker Engine) running
  • Python 3.11+ (only if you want to run the scraper)

1. Install and start Supabase

cd frontend
npm install               # installs the Next.js app and pins the Supabase CLI
npm run db:start          # starts the full Supabase stack via Docker

The first run pulls images and applies supabase/migrations/*.sql + supabase/seed.sql. API ends up at http://127.0.0.1:54321.

2. Get local keys and write frontend/.env.local

npm run db:status

Copy the Publishable key (sb_publishable_…) from the output, then:

cp .env.example .env.local       # in frontend/
# edit .env.local and paste the Publishable key after NEXT_PUBLIC_SUPABASE_ANON_KEY=

NEXT_PUBLIC_SUPABASE_URL is already http://127.0.0.1:54321 in the template.

3. Run the web app

npm run dev                # from frontend/

Open http://localhost:3000. For magic-link login, read emails at http://127.0.0.1:54324 (Mailpit).

4. (Optional) Run the scraper

cp scraper/.env.example scraper/.env
# edit scraper/.env: paste the Secret key (sb_secret_…) and your OPENAI_API_KEY

cd scraper
uv venv && source .venv/bin/activate   # Windows: .venv\Scripts\activate
uv pip install -r requirements.txt
playwright install chromium --with-deps
uv run main.py --test-run

--test-run uses the first two companies and skips DB writes.

5. Reset or stop the stack

npm run db:reset    # wipe + reapply migrations and seed
npm run db:stop     # stop containers (data persists in Docker volume)

Production deployment

The short version lives here; the full checklist (Supabase project setup, Vercel env vars, GitHub Actions secrets, custom domains) is in docs/supabase-environments.md.

  1. Supabase Cloud — create a project, apply supabase/migrations/001_initial_schema.sql, copy the Project URL + anon key + service_role key.
  2. Vercel — import the repo, set Root Directory to frontend, add NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY (anon only — never the service_role key here). Add https://<your-domain>/auth/callback to Supabase Auth → Redirect URLs.
  3. GitHub Actions — add SUPABASE_URL, SUPABASE_SERVICE_KEY, and OPENAI_API_KEY as repository secrets. The workflow in .github/workflows/scraper.yml runs daily at 06:00 UTC.

The service_role key (sb_secret_… locally, service_role in the Cloud dashboard) bypasses RLS. Keep it in scraper/.env and GitHub Secrets only — never in any NEXT_PUBLIC_* variable or frontend code.


Environment files

File When What goes in
frontend/.env.local Local Next.js dev NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY (Publishable key)
scraper/.env Local scraper run SUPABASE_URL, SUPABASE_SERVICE_KEY (Secret key), OPENAI_API_KEY

Both files are gitignored. Templates without secrets: frontend/.env.example, scraper/.env.example.

Production uses Vercel env vars and GitHub Secrets instead of committed files.


Quick reference

# Frontend
cd frontend && npm install && npm run dev

# Supabase local (pinned CLI, run from frontend/)
npm run db:start | db:stop | db:status | db:reset

# Scraper (local, full run)
cd scraper && source .venv/bin/activate && uv run main.py

Contributing

See docs/plan.md for product context and docs/future_plan.md for upcoming work. Do not commit secrets.

License

Add a LICENSE file if you intend to open-source the project; until then, all rights reserved unless stated otherwise by the repository owner.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors