Live Demo: https://kindred-seven-pi.vercel.app
Kindred is a full-stack web app for tracking community impact. Volunteers log their work in a journal, earn points across six impact tracks, and unlock earned titles as their points grow. A shared directory lets people find other volunteers by location and interest.
- Email and password accounts secured with JWT (7 day expiry) and bcrypt password hashing
- Profiles with name, location, bio, interests, and a privacy toggle for community visibility
- Six impact tracks: Environment, Education, Social Work, Healthcare, Animal Welfare, and Disaster Relief
- Earned titles based on track points, including combination titles drawn from your top three tracks
- Journal entries worth 10 points each, credited to the chosen track
- Community directory of visible members with location and interest filters plus community stats
- Profile and settings pages
- Frontend: React 19, Vite, React Router 7, plain CSS
- Backend: Express 5, MongoDB via Mongoose 9, JSON Web Tokens, bcryptjs, CORS, rate limiting
- Tooling: ESLint, gitleaks secret scanning via pre-commit hooks
- Node.js 18 or newer
- A running MongoDB instance (local or hosted)
The backend reads these environment variables:
| Variable | Required | Purpose |
|---|---|---|
MONGODB_URI |
No | Connection string. Defaults to mongodb://127.0.0.1:27017/kindred |
JWT_SECRET |
Yes | Secret used to sign auth tokens |
PORT |
No | Backend port. Defaults to 5000 |
FRONTEND_URL |
No | Extra allowed origin for CORS in production |
The frontend reads one optional variable:
| Variable | Required | Purpose |
|---|---|---|
VITE_API_URL |
No | Backend API base URL. Defaults to http://localhost:5000/api |
Clone the repository, then install dependencies separately for the backend and the frontend.
cd kindred/kindred-backend
npm installCreate a .env file next to server.js:
MONGODB_URI=mongodb://127.0.0.1:27017/kindred
JWT_SECRET=replace-with-a-long-random-string
PORT=5000Start the backend:
npm run dev # nodemon, auto restarts
npm start # plain nodeThe API runs on http://localhost:5000.
Open a second terminal:
cd kindred
npm install
npm run devThe app runs on http://localhost:5173.
kindred/
βββ README.md # This file
βββ kindred/ # React + Vite frontend
βββ index.html
βββ pages/ # ProfileSettingsPage (routed at /profile by src/App.jsx)
βββ components/
β βββ settings/ # BasicInfoSection, InterestsSection, SaveBar, visibilitySection
βββ src/
β βββ components/ # Nav, journal timeline, title card, hero space
β βββ context/ # AuthContext for login state
β βββ data/ # Title ladders per track
β βββ pages/ # Auth, Home, Community pages
β βββ services/ # API client
βββ kindred-backend/ # Express API
βββ server.js # App entry point and route mounting
βββ middleware/ # JWT auth guard
βββ models/ # User and JournalEntry schemas
βββ routes/ # auth, users, journal, community
Base URL: http://localhost:5000/api
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register |
Create an account and return a token |
| POST | /auth/login |
Sign in and return a token |
| POST | /auth/guest |
One-click guest login, no form needed, returns a token |
| Method | Endpoint | Description |
|---|---|---|
| GET | /users/profile |
Get your profile |
| PUT | /users/profile |
Update profile fields and visibility |
| GET | /users/tracks |
Get your six tracks and points |
| PUT | /users/tracks/:trackName |
Set points for one track |
| Method | Endpoint | Description |
|---|---|---|
| POST | /journal/entries |
Create an entry and add 10 points to its category |
| GET | /journal/entries |
List your entries, newest first |
| DELETE | /journal/entries/:entryId |
Delete one of your entries |
| Method | Endpoint | Description |
|---|---|---|
| GET | /community/members |
Visible members, filterable by location and interest query params |
| GET | /community/members/:userId |
One visible member |
| GET | /community/stats |
Member count plus distinct locations and interests |
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Returns { status: "Backend is running" } |
Rate limiting applies globally at 300 requests per 15 minutes, and auth endpoints are limited to 20 requests per 15 minutes.
This repo uses gitleaks to scan every commit for secrets such as API keys, passwords, tokens, and private keys.
Install the hook locally:
pip install pre-commit
pre-commit installUse git commit --no-verify only in emergencies. Regular commits should always be scanned.