Skip to content

ProjectNeura/Join

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Neura Application Portal

A Cloudflare Pages application portal for Project Neura. It includes:

  • Public job listing page at /
  • Per-job application pages at /jobs/:slug
  • Public application check-back page at /check
  • Staff admin panel at /admin
  • Editable per-job application fields managed from the admin panel
  • One active application per email address for each job
  • Applicant withdrawal from the check-back page while the job post remains open
  • Applicant status tracking with under review, admitted, and rejected states
  • Batch admission and rejection email sending from the admin panel
  • Editable email templates with dynamic fields such as {{job_title}}
  • Cloudflare Pages Functions APIs
  • Cloudflare D1 storage for jobs and applications

The admin panel intentionally does not include application-level authentication. Put Cloudflare Zero Trust Access in front of /admin* and /api/admin/*.

Applicants receive a private lookup code after submitting. They can use that code on /check to retrieve the application they submitted. Staff can add role-specific application fields such as text, long-answer, URL, and select questions when creating or editing a job post. When SMTP secrets are configured, applicants also receive a confirmation email with their check-back code after submitting.

Local setup

  1. Install dependencies:

    npm install
  2. Create the local D1 database and apply migrations:

    npx wrangler d1 create projectneura-join
    npm run db:migrate:local
    npx wrangler d1 execute projectneura-join --local --file seed.sql
  3. Start Pages dev:

    npm run dev

The app will be available at the URL printed by Wrangler, usually http://localhost:8788.

Cloudflare setup

  1. Create a D1 database:

    npx wrangler d1 create projectneura-join
  2. Copy the generated database_id into wrangler.toml.

  3. Apply the remote migration:

    npm run db:migrate:remote
  4. Deploy to Cloudflare Pages:

    npm run deploy
  5. In Cloudflare Zero Trust Access, create an application or policy that protects:

    https://<your-domain>/admin*
    https://<your-domain>/api/admin/*
    

Public visitors only need access to /, /jobs/:slug, /check, /api/jobs, and /api/applications.

Email confirmation

The application sends applicant confirmation emails through SMTP when these secrets are available to the Pages Functions runtime:

SMTP_HOST=shadow.mxrouting.net
SMTP_USERNAME=join@projectneura.org
SMTP_PASSWORD=<set as a secret>
SMTP_FROM=Project Neura <join@projectneura.org>
SMTP_REPLY_TO=join@projectneura.org

In Cloudflare Pages, add these under Settings > Variables and Secrets and encrypt SMTP_PASSWORD. For local development, put them in .dev.vars; do not commit that file.

Email is sent through the MXroute SMTP API at https://smtpapi.mxroute.com/, using SMTP_HOST as the MXroute server hostname. You can override the API endpoint with SMTP_API_URL if MXroute changes it.

After setting or changing Pages secrets, redeploy the project so the Functions runtime receives the new values.

The Email tab also includes editable templates for confirmation, admission, and rejection emails. Supported dynamic fields include {{full_name}}, {{email}}, {{job_title}}, {{job_location}}, {{job_employment_type}}, {{lookup_code}}, and {{check_url}}.

About

Application Portal

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors