# Accounts (/docs/accounts) Everyone on KarmaCircle has one login. It is either a **personal** account or an **organization** account, chosen at sign-up. | Account | What it is for | | --- | --- | | **Personal** | Browse and join events, follow organizations, keep a small profile. | | **Organization** | Everything a personal account does, plus a public organization page and hosting events. | ## Staying signed in [#staying-signed-in] ## Good to know [#good-to-know] - **Logging out** signs you out on every device, not just this one. So does resetting your password. - **Your details are yours.** Nobody else can read your account, and your password is stored in a form that cannot be read back. - **Not built yet:** deleting an account, changing your email, and a change-password page. ## Your data [#your-data] ### What we collect [#what-we-collect] | Data | When | Required | | --- | --- | --- | | Account type: personal or organization | Sign-up | Yes | | Name | Sign-up, or from Google | Yes | | Email address | Sign-up, or from Google | Yes | | Password, stored as a one-way hash | Sign-up and password reset | Yes, unless you use Google | | A username made from your email | Sign-up, automatically | Automatic | | Short bio | Your profile | No | | City, state, country, address and PIN code | Your profile | No | | Sign-up date | Sign-up, automatically | Automatic | From Google we take only your name and email address. ### Why [#why] - **Account type** decides what you can do: only organization accounts can host events. - **Name** is what organizers and organizations see when you join or follow. - **Email** is how you sign in, and where event and password emails go. - **Password** proves it is you. Nobody, including KarmaCircle, can read it back. - **Username** gives every account a unique name inside the system. - **Bio and location** let you fill in a profile. They are never shown publicly. ### What we do with it [#what-we-do-with-it] - **You** can see and edit all of it. Nobody else can open your account. - **Organizers** of events you join see your name and email. See [Events](/docs/events#your-data). - **Organizations** you follow see your name on their dashboard, not your email. - **The email service (Resend)** receives your email address when an email is sent to you. - **Google** is involved only if you choose Continue with Google. - **Kept** for as long as the account exists. Deleting an account is not built yet. - A password-reset link is stored only as a hash, and stops working after one hour. ### How it moves [#how-it-moves] ## In this section [#in-this-section] - Sessions are a JWT in an `httpOnly` cookie named `Token`, valid for 30 days. Logout and password reset end every session of the account. - On start-up the web app checks the remembered sign-in with `GET /user/profile` in the background, so public pages show at once; only sign-in-only pages wait for it. A rejected session is cleared. - Accounts are rows in `users` with `user_type` of `individual` or `organization`. Responses go through `userService.sanitize()` and only to the owner. | Piece | Where | | --- | --- | | Auth routes | [`apps/api/src/modules/auth/`](https://github.com/karmacircleCommunity/KarmaCircle/tree/main/apps/api/src/modules/auth) | | Session check | [`SessionBootstrap.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/authentication/components/SessionBootstrap.tsx) | | Table | `users` | # Password and profile (/docs/accounts/password-and-profile) ## Forgot your password [#forgot-your-password] - The page gives the same answer whether or not the email has an account, so nobody can use it to check who is signed up. - An expired or used link is refused. Ask for a new one. ## Your profile [#your-profile] A personal account edits its profile at `/user/setup`, one short question at a time. Nothing is required. - A short bio. - City and state, with suggestions and a "use my location" option. - An address. It stays private: personal accounts have no public page. ## Pages that need you signed in [#pages-that-need-you-signed-in] Creating events, My Events, editing your profile, and the attendee pages send signed-out visitors to sign in first. The sign-in and reset pages send already signed-in visitors to the home page. - Reset: `POST /auth/forgot-password`, then `POST /auth/reset-password` with the token from `/auth/reset-password/`. Only a hash of the token is stored; it lasts 1 hour and is single use. - Profile: `GET /user/profile` and `PATCH /user/update` (only sent fields are written; an address update replaces the whole address). - Route guards: `RequireSignIn` and `DonotRenderWhenLoggedIn` in the web app. | Piece | Where | | --- | --- | | Reset email | [`mailer.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/config/mailer.ts) | | Profile service | [`apps/api/src/modules/users/`](https://github.com/karmacircleCommunity/KarmaCircle/tree/main/apps/api/src/modules/users) | # Sign up and sign in (/docs/accounts/sign-in) Signing in and signing up happen on the same page. You type your email first, and the page works out the rest. ## How it works [#how-it-works] ## Continue with Google [#continue-with-google] Instead of a password, people can press **Continue with Google**. Google confirms who they are, and KarmaCircle signs them in, or creates their account if it is their first time. KarmaCircle never sees the Google password. ## Good to know [#good-to-know] - **Passwords** need at least 8 characters, with a number, a lowercase and an uppercase letter. - **Names** use letters and single spaces only. - **One account per email.** Signing up again with the same email is refused. - **Account type** is set once. A returning person keeps their type whatever they pick on the first step. - After signing in, people go back to the page they came from. - `/auth/signin` and `/auth/signup` open the same page. `GET /auth/check-email` decides the next step; then `POST /auth/signin` or `POST /auth/signup`. - An organization sign-up creates the login and a draft `organizations` row in one transaction. - Google: `GET /auth/google` then `GET /auth/google/callback`, which finds or creates the account by email, sets the `Token` cookie and redirects; the web app then calls `GET /auth/login/success`. Google sign-ups get their organization row on first visit to setup or the dashboard. - Return paths are accepted only on this site and never to another `/auth` page. | Piece | Where | | --- | --- | | Page | [`Auth.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/authentication/pages/Auth.tsx) | | Service | [`auth.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/auth/auth.service.ts) | # Create and publish (/docs/events/create-and-publish) An organization creates an event with a short four-step form. It can save a draft at any point and publish when everything is ready. ## How it works [#how-it-works] **Fill in the steps** in any order. A preview shows the event as people will see it. **Add a cover image.** It uploads as soon as it is picked (PNG, JPEG, WebP or GIF, up to 5 MB). **Save a draft or publish.** A draft can be finished later from My Events. ## Good to know [#good-to-know] | | A draft needs | Publishing also needs | | --- | --- | --- | | Name | 10 to 80 characters | same | | Dates | a start in the future and an end after it | same | | Description | optional | 20 to 200 characters | | Cover image | optional | required | | Place | optional | the venue for in-person, the meeting link for online, both for hybrid | - **The page address** (like `/events/beach-cleanup`) is made from the name and can never change later. - **Times** are entered in the event's own time zone. Visitors see that time, plus their own when it differs. - **Unpublishing** a live event back to a draft only works while nobody has joined. After that, the organizer cancels instead. - **Deleting** only works for drafts. A published event is never deleted. - Extra details such as the agenda, cost, what to bring and languages are added later on the edit form. - Create: `POST /events/create` with `status: draft` or published. A taken `uid` answers 409; reserved words are `mine`, `new`, `create`, `edit`, `admin`, `api`. - Publish, unpublish, delete: `POST /events/:uid/publish`, `POST /events/:uid/unpublish`, `DELETE /events/:uid` (drafts only). Saves use a `version` check, so a stale save answers 409. - Cover upload: `POST /uploads/event-covers` returns a short-lived Vercel Blob client token (or a signed local `PUT /uploads/local/:token` in development). The event stores only the https link. - Tags: up to 8, each up to 30 characters. Capacity: 1 to 100000, or empty for no limit. Time zones must be full IANA names or `UTC`. | Piece | Where | | --- | --- | | Form | [`CreateEvents.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/events/components/CreateEvents.tsx) at `/organization/events/new` | | Browser checks | [`validateEvent.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/events/utils/validateEvent.ts) | | API rules | [`event.validation.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/events/event.validation.ts) | | Uploads | [`upload.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/uploads/upload.service.ts) | # Emails (/docs/events/emails) Events send an email whenever something changes for a person. The website never sends email itself: it leaves a note in a queue, and a small separate program sends it. ## Who gets what [#who-gets-what] | Email | Who gets it | When | | --- | --- | --- | | You're going | the person | they join, accept an invitation or get approved | | Someone joined | the organizer | a person joins | | Someone asked to join | the organizer | a person asks or joins the waitlist | | You're invited | the invited address | the organizer invites them | | Event changed | everyone going | the time, place, format or meeting link changes | | Event cancelled | everyone going, waiting or asking | the event is cancelled | | Not approved, or place removed | the person | the organizer declines them | Each person gets their own copy, so nobody sees anyone else's address. Times in emails use the event's own time zone. ## How an email is sent [#how-an-email-is-sent] **The change and its email are saved together.** If the change fails, no email goes out. **The website wakes the worker.** If that call is missed, the worker still checks every hour. **The worker sends the email**, retrying a failed one after 30 seconds, 2 minutes, 8 minutes and 32 minutes. ## Good to know [#good-to-know] - There is a daily sending limit. Emails over it wait until the next day. - The meeting link is never written in an email. People find it on the event page. - Drafts never send email. - Reminders before an event starts are not built yet. - The API inserts an `email` job into `jobs` in the same transaction as the change (a transactional outbox), then calls the worker's `POST /wake` with a bearer secret. - The Go worker claims due jobs with `FOR UPDATE SKIP LOCKED`, sends batches of up to 100 through Resend with the job id as an idempotency key, and marks a job `dead` after 5 attempts. - The worker sends real email only when `APP_ENV=production`; otherwise it logs and drops. Its daily cap is `EMAIL_DAILY_CAP`. - Done jobs are deleted after 7 days and dead jobs after 30. Details: [Background jobs](/docs/platform/background-jobs). | Piece | Where | | --- | --- | | Email wording | [`mailer.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/config/mailer.ts) | | What triggers each email | [`event.notifications.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/events/event.notifications.ts) | | Queue and wake | [`job.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/jobs/job.service.ts) | | Worker | [`apps/worker/`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/worker/README.md) | # Find and join (/docs/events/find-and-join) Anyone can browse events at `/events`, signed in or not. To join, a person needs an account. What happens when they press Join depends on how the organizer set the event up. ## What happens when someone joins [#what-happens-when-someone-joins] **Invited people always get in**, even when the event is full. **Invite-only events** turn away anyone without an invitation. **A full event** puts people on the waitlist if it has one, or says it is full. **Otherwise** an open event lets them straight in, and an approval event sends the organizer a request, with an optional note of up to 300 characters. ## Finding events [#finding-events] - **Upcoming and Past.** An event stays Upcoming until it ends, so one happening right now is still listed. - **Search** looks at the event name, city, organizer and tags. - **Filters** narrow by who can join, in person or online, and kind of event. - More events load as you scroll, 12 at a time. - Cancelled events still show, with a Cancelled label. Drafts never show. The event page shows the details, the organizer, the place, and buttons to add the event to Google Calendar or download it for any other calendar app. ## Good to know [#good-to-know] - **The meeting link** of an online event is only shown to the organizer and to people who are going. - **Leaving** is possible until the event starts. A spot that frees up is not handed on automatically: the organizer moves people up from the waitlist. - **Declined** people cannot ask again unless the organizer approves them later. - **My Events** (`/events/mine`) lists what you are attending: Upcoming, Past and Invited. - Join: `POST /events/:uid/join` runs in one transaction that locks the event row, so the last spot cannot be taken twice. Asking twice returns the existing standing. - Standing: `GET /events/:uid/registration` returns `status`, `joined` and `invited`. Leave: `DELETE /events/:uid/registration` (409 once started). - Directory: `GET /events` with `period=upcoming|past`, search capped at 100 characters, 1 to 100 per page (the web app asks for 12). - The API strips `platformLink` from every event response and adds it back only for the host and for people going. - Capacity is soft: invites and the organizer's approvals can go past it. Only `going` counts toward it. | Piece | Where | | --- | --- | | Directory | [`Events.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/events/pages/Events.tsx) | | Event page | [`DetailedEvent.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/events/pages/DetailedEvent.tsx) | | Join button logic | [`joinView.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/events/utils/joinView.ts) | | Meeting link rule | [`event.presenter.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/events/event.presenter.ts) | | Tables | `event_registrations`, `event_invites` | # Events (/docs/events) An event is a drive, class, camp or meetup that an organization hosts. Anyone can browse events, and anyone with an account can join them. Only organization accounts can create and run events. ## The life of an event [#the-life-of-an-event] First the organization fills in the event's details: its name and kind, who can attend, the dates, and where it happens. Then it either saves the event as a draft to finish later, or publishes it straight away. Once published, people can find the event and join it, until it ends or the organization cancels it. **Fill in the details.** A short form asks for the name, the kind of event, who can attend, the dates and the place or meeting link. **Draft or publish.** A draft only needs the basics and stays private, so it can be finished later. Publishing needs everything filled in. **Published.** Everyone can see the event and join it. While nobody has joined yet, the organization can still unpublish it back to a draft. **Cancelled.** The organization calls it off. This cannot be undone, and everyone involved gets an email. **Past.** Nothing needs to happen: an event is past as soon as its end time goes by. ## Three ways to set up an event [#three-ways-to-set-up-an-event] | Choice | Options | | --- | --- | | **Where** | In person, online, or both (hybrid) | | **Who can join** | Anyone, people the organizer approves, or invited people only | | **How many** | A set number of spots with an optional waitlist, or no limit | There are seven kinds of event: volunteering drive, fundraiser, workshop, awareness campaign, meetup, cultural event and other. ## Your data [#your-data] ### What we collect [#what-we-collect] **About the event**, from the organization: | Data | Required to publish | Shown publicly | | --- | --- | --- | | Name, description, kind, tags, cover image | Name, description and cover | Yes | | Format, venue address, city, state, country, map | The venue for in-person events | Yes | | Online platform and meeting link | The link for online events | The platform yes, the link no | | Start, end and time zone | Yes | Yes | | Who can join, number of spots, waitlist on or off | Yes | Yes | | Extra details: about, agenda, what to bring, getting there, cost, fundraiser, languages, minimum age, join requirements, contact email, government-sponsored | No | Yes | **About each person who joins:** | Data | When | Required | | --- | --- | --- | | Name and email, from their account | They press Join | Yes | | Their standing: going, asked, waitlisted or declined | Join, and the organizer's decisions | Automatic | | A note to the organizer, up to 300 characters | Approval events | No | | When the organizer decided, and when they checked in | The organizer acts | Automatic | **About each invitation:** the invited email address, who sent it, and when it was used. ### Why [#why] - **Event details** tell people what, when and where, so they can decide to come. - **The meeting link** is kept back so only people with a spot can enter the online room. - **Name and email** let the organizer know who is coming and let KarmaCircle email them about changes. - **Standing, decisions and check-in** run the guest list and the door. - **Invitations** let invited people in, even to a full or invite-only event. ### What we do with it [#what-we-do-with-it] - **Anyone** sees the event details, except the meeting link. - **The meeting link** is shown only to the organizer and to people who are going, and is never put in an email. - **The hosting organization** sees each person's name, email, standing, note and check-in time, and can download them as a spreadsheet. - **Other people** never see who else joined. - **The email service (Resend)** receives each person's address and the email's contents. A copy of each email waits in the job queue and is deleted 7 days after sending, or 30 days after it finally fails. - **Kept:** published and cancelled events, and their guest lists, are kept for good. Drafts can be deleted. - **Leaving** an event before it starts deletes your registration. A "declined" record is kept so the same request cannot be sent again. - **An invitation** is kept until the organizer takes it back. ### How it moves [#how-it-moves] ## In this section [#in-this-section] - An event has one stored `status`: `draft`, `published` or `cancelled`. "Past" is not stored: it is worked out from `endsAt`. - Format is stored as `mode` (`Offline`, `Online`, `Hybrid`), kind as `eventType`, access as `access` (`open`, `approval`, `invite`). - A registration has one `status`: `going`, `pending`, `waitlisted` or `declined`. Only `going` holds a spot. | Piece | Where | | --- | --- | | Web feature | [`apps/web/src/features/events/`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/events/SPEC.md) | | API service | [`event.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/events/event.service.ts) | | Model | [`event.model.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/events/event.model.ts) | | Tables | `events`, `event_registrations`, `event_invites`, `jobs` | # Manage an event (/docs/events/manage-an-event) Organizers run their events from **My Events** and from each event's **Attendees** page. ## The organizer's tools [#the-organizers-tools] ## Attendees [#attendees] - Lists for **Going**, **Requests**, **Waitlist** and **Declined**, with search by name or email. - **Approve** or **Move up** makes someone going, even past the capacity. They get a confirmation email. - **Decline** removes someone and emails them. If they were going, their spot opens up. - **Check in** records when someone arrived. It can be undone. - **Invite** people by email on approval and invite-only events, up to 50 at a time and 200 per event. Unused invitations can be taken back. - **Download CSV** gives everyone, with name, email, status, note and check-in time. ## Editing [#editing] - Anything except the page address can change, until the event ends. - If the time, place, format or meeting link of a live event changes, everyone going gets an email listing what moved. - If two people edit at once, the second save is refused and asks them to reload, so nobody overwrites the other. - Capacity cannot go below the number of people already going. ## Cancelling [#cancelling] - Cancelling is final. The event stays visible with a Cancelled badge and nobody new can join. - Everyone going, waiting or asking to join gets one email each. - A cancelled event cannot be edited, and a published event is never deleted. - Edit: `PATCH /events/:uid` with only the changed fields; the row is saved with a `version` check (409 "This event just changed" on conflict). Sending `uid` is a 400. - Cancel: `POST /events/:uid/cancel` flips `status` to `cancelled` with one conditional update and queues the emails in the same transaction. - Attendees: `GET /events/:uid/attendees` (50 per page), `GET /events/:uid/attendees/export`, `PATCH /events/:uid/attendees/:registrationId` (check-in), `POST .../approve`, `POST .../decline`. Only the hosting organization may call them. - CSV cells that start with `=`, `+`, `-`, `@`, a tab or a carriage return are prefixed so spreadsheets do not run them as formulas. | Piece | Where | | --- | --- | | Hosting list | [`HostedEvents.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/events/components/HostedEvents.tsx) | | Attendee page | [`EventAttendees.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/events/pages/EventAttendees.tsx) | | Edit form | [`EditEvent.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/events/pages/EditEvent.tsx) | | Service | [`event.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/events/event.service.ts) | # Glossary (/docs/glossary) | Word | Meaning | | --- | --- | | Personal account | A person's login. Can follow, join and support. | | Organization account | A login that owns an organization page and can host events. | | Handle | An organization's unique address, as in `/organization/`. | | Draft | Saved but not public yet. Organizations and events both start as drafts. | | Live | An organization page that finished setup and is public. | | Published | An event that is public and open to join. | | Cancelled | An event the organizer called off. It stays visible and cannot be undone. | | Format | How an event happens: in person, online, or both (hybrid). | | Access | Who can join: anyone, people the organizer approves, or invited people only. | | Going | Has a spot at an event. | | Asked to join | Waiting for the organizer to say yes or no. | | Waitlisted | Waiting because the event is full. | | Declined | The organizer said no. | | Capacity | How many spots an event has. Organizers can still approve or invite past it. | | Support | A payment from a person to an organization. | | Paise | 1/100 of a rupee. Money is stored in paise. | | Job | A task saved for the worker to do later, such as sending an email. | | Worker | The small background program that does jobs. | # Welcome (/docs) KarmaCircle connects NGOs, charities and community groups with the people who want to help them. ## How to read this guide [#how-to-read-this-guide] - **Each page is short.** It says what something is, shows one diagram, and lists what is good to know. - **Diagrams are interactive.** Hover a box to light up its connections, drag to move around, and use + and - to zoom. - **Technical details are tucked away** in a "For developers" box at the end of each page. - **Developer docs** live with the code: the [web app specs](https://github.com/karmacircleCommunity/KarmaCircle/tree/main/docs/specs) and the [API specs](https://github.com/karmacircleCommunity/KarmaCircle/tree/main/apps/api/docs/specs) go into far more detail, and link back here. - **AI tools** can read the whole guide as plain text at [/llms.txt](/llms.txt) and [/llms-full.txt](/llms-full.txt), or any single page by adding `.md` to its address. ## Start with an area [#start-with-an-area] The code is the final word. If this guide and the [code](https://github.com/karmacircleCommunity/KarmaCircle) ever disagree, the code is right and the page gets fixed. # Dashboard and followers (/docs/organizations/dashboard-and-followers) Every organization owner gets a private dashboard at `/dashboard`. It shows how the organization is doing at a glance and refreshes itself every minute. ## What the dashboard shows [#what-the-dashboard-shows] | Number | What it counts | | --- | --- | | Followers | people following the organization | | Following | organizations the owner follows | | Hosted events | events that are not drafts, all time | | Registrations | sign-ups across those events | | Support received | paid support payments | | Profile views | profile visits in the last 30 days | Below the numbers: a profile-views chart for 7, 30 or 90 days, the latest followers, recent events, and recent supporters. A **profile completeness** bar points to the next detail worth adding, such as a logo or a website. ## How profile views are counted [#how-profile-views-are-counted] The chart never has gaps: days the worker has not added up yet are counted straight from the saved visits. ## Good to know [#good-to-know] - **Following** needs an account. Following twice changes nothing, and an owner cannot follow their own organization. - **Views** count page loads, not unique people, and use UTC days. Visits older than a year are deleted. - **Supporters** who gave no name show as "Anonymous supporter". - Dashboard: `GET /organizations/dashboard` (401 signed out, 403 for non-organizations), polled every 60 seconds. - Follow: `GET`, `POST`, `DELETE /organizations/:handle/follow`, which keep the `followers` counter in step in one transaction. - Views: `POST /organizations/:handle/analytics/profile-view` inserts into `organization_analytics_events`. The worker's `analytics_rollup` job writes `organization_view_daily`, deduplicated per 10 minutes. | Piece | Where | | --- | --- | | Dashboard | [`Dashboard.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/dashboard/pages/Dashboard.tsx) | | Service | [`organization.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/organizations/organization.service.ts) | | Rollup | [`rollup.go`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/worker/rollup.go) | # Organizations (/docs/organizations) An organization is an NGO, charity, trust, club or community group with its own page on KarmaCircle. It hosts events, gains followers and can accept support payments. ## From sign-up to public page [#from-sign-up-to-public-page] **Sign up.** Choosing "organization" at sign-up creates the account and an empty, hidden organization. **Answer the setup questions**: what you do, your causes, team size and city. **Go live.** The moment the required details are filled in, the page becomes public. Nothing else to press. ## What an organization can do [#what-an-organization-can-do] - Host [events](/docs/events) and manage who comes. - Show a public profile with its story, causes, team and contact details. - Gain followers. - Turn on a **Support** button so people can [pay it online](/docs/payments). - Watch followers, events, support and profile views on a private [dashboard](/docs/organizations/dashboard-and-followers). ## Good to know [#good-to-know] - **Required to go live:** a description, a type (such as NGO or Trust), at least one cause, team size and city. - **Hidden until live.** A draft does not show in the directory, and its page says "not found". - **Private details stay private.** The phone number, the owner's email and the member list are never shown publicly. - **Verified** organizations get a tick. Only KarmaCircle can set it. ## Your data [#your-data] ### What we collect [#what-we-collect] | Data | Who gives it | Shown publicly | | --- | --- | --- | | Name, type, causes, description, team size | The organization, at setup | Yes | | City, state, address and a map | The organization | Yes | | Website, contact email, social links | The organization | Yes | | Logo, cover photo and gallery | The organization | Yes | | Team: name, title, photo and short bio of each leader | The organization | Yes | | Funds raised (stated) and a funds goal | The organization, optional | Yes | | Whether the Support button is on | The organization | Yes | | Contact phone | The organization, optional | No | | Owner's email, and the members' emails and roles | Sign-up | No | | Who follows the organization (their account) | People who press Follow | Only the count | | Profile visits: which organization, and when | Counted automatically | No | | Verified tick, status, follower count, page address | KarmaCircle | Yes | A profile visit records nothing about the visitor: no name, account or address. ### Why [#why] - **Profile details** tell people what the organization does and how to reach it. - **The owner's and members' emails** decide who can manage the organization. - **Follows** let people keep up with organizations, and show the organization how many people care. - **Profile visits** give the organization a views chart on its dashboard. - **Funds and the Support switch** decide whether people can pay it online. See [Payments](/docs/payments#your-data). ### What we do with it [#what-we-do-with-it] - **Anyone** sees the public details in the table above. - **The owner** also sees the phone, the members, the latest followers' names and the views chart. - **Followers' emails** are never shown to the organization: it sees their names only. - **Kept** for as long as the organization exists. A follow is deleted when the person unfollows. - **Profile visits** are deleted after one year. The daily totals made from them are kept. - Everything is kept in the database. Pictures are kept as links to the image files. ### How it moves [#how-it-moves] - `organizations.status` is `draft`, `live` or `suspended`. A save that fills `description`, `tag`, `domains`, `teamSize` and `city` sets `live` in the same transaction. - What is public is decided in one place: `toPublic` and `toPrivate` in the organization service. - The `handle` is the public address (`/organization/`) and never changes. | Piece | Where | | --- | --- | | Web screens | [`features/organizations`](https://github.com/karmacircleCommunity/KarmaCircle/tree/main/apps/web/src/features/organizations) | | API routes | [`organization.routes.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/organizations/organization.routes.ts) | | Service | [`organization.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/organizations/organization.service.ts) | | Tables | `organizations`, `organization_follows`, `organization_analytics_events`, `organization_view_daily` | # Setup and public profile (/docs/organizations/setup-and-profile) An organization answers a few setup questions to go live, then keeps its profile current from an editor. Anyone can find it in the directory, signed in or not. ## Setting up [#setting-up] The setup asks one question at a time and saves after each step, so nothing is lost if you leave halfway. | Step | Asks for | | --- | --- | | About your work | name, what you do, type of organization, up to 5 causes | | Your reach | team size, city and state | | Support | whether to accept payments through KarmaCircle | Once live, the same address (`/organization/setup`) opens an **editor** with a live preview: basics, location and contact, and social links. **Types:** NGO, Charity, Foundation, Club, Student group, Community group, Trust, Self-help group. **Causes:** Animal welfare, Disaster relief, Education, Environment, Food and hunger, Healthcare, Livelihood, Women and children, Elderly care, Shelter. ## Being found [#being-found] A public profile shows the cover and logo, the story, causes, team size, followers, the team, upcoming and past events, contact details and a map, and the Support button when it is switched on. ## Good to know [#good-to-know] - Verified organizations show a tick and appear higher in the directory. - "Funds raised (stated)" is a figure the organization types in. "Raised via KarmaCircle" is counted from real, checked payments. The two are never added together. - The editor does not yet change the logo, cover, gallery or team list. - Setup and editor both save with `PATCH /organizations/me`; each wizard step sends only its own fields. The schema is strict: `status`, `verified`, `followers`, `handle` and `ownerEmail` cannot be sent. - Organizations made through Google sign-up get their row on the first call to `GET /organizations/me` (`findOrCreateForOwner`). - Types and causes come from `GET /organizations/taxonomy`. - Directory: `GET /organizations` (live only, 12 per page in the web app). Profile: `GET /organizations/:handle`; a draft and an unknown handle both answer 404. - Limits: name 1 to 120, description up to 500, up to 5 causes, team size 1 to 1,000,000, phone 7 to 15 digits. | Piece | Where | | --- | --- | | Setup wizard | [`OrganizationSetup.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/organizations/pages/OrganizationSetup.tsx) | | Editor | [`OrganizationProfileEditor.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/organizations/components/OrganizationProfileEditor.tsx) | | Directory | [`Organizations.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/organizations/pages/Organizations.tsx) | | Profile | [`OrganizationProfile.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/organizations/pages/OrganizationProfile.tsx) | | Request rules | [`organization.validation.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/organizations/organization.validation.ts) | # Supporting an organization (/docs/payments) Anyone can support an organization that has switched its **Support** button on. They pick an amount, pay through Razorpay, and KarmaCircle checks the payment is real before counting it. No account is needed. ## How a payment works [#how-a-payment-works] **Pick an amount** (at least 1 rupee) and, if you like, a name to show the organization. **Pay** in Razorpay's secure window. **KarmaCircle checks the payment** with Razorpay's signature. Only a checked payment is counted, and it can never be counted twice. ## Good to know [#good-to-know] - Payments are in Indian rupees only, up to 10 lakh at a time. - An organization can receive support only when it is live and has switched support on. - Its page shows two figures: "Raised via KarmaCircle" (checked payments) and "Funds raised (stated)" (typed in by the organization). - The organization sees recent supporters on its dashboard. Anyone who gave no name shows as "Anonymous supporter". ## Your data [#your-data] ### What we collect [#what-we-collect] | Data | When | Required | | --- | --- | --- | | Which organization you support | You open the Support window | Yes | | Amount and currency (rupees) | You choose an amount | Yes | | A name to show the organization | You type one | No | | Razorpay's order and payment references | Razorpay creates them | Automatic | | Whether the payment was confirmed | KarmaCircle checks it | Automatic | | Date and time | Automatically | Automatic | KarmaCircle never sees your card, UPI or bank details. You type those into Razorpay's own window, and Razorpay keeps them under its own rules. You do not need an account, and no account is linked to the payment. ### Why [#why] - **Organization and amount** are the payment itself. - **The name** lets the organization thank you. Leave it empty to stay anonymous. - **Razorpay's references and the confirmation** prove the payment really happened, so only real payments are counted, and never twice. ### What we do with it [#what-we-do-with-it] - **The organization** sees your name, or "Anonymous supporter", with the amount on its dashboard. - **The public** sees only the organization's total "Raised via KarmaCircle", never who paid. - **Razorpay** receives the amount, and your name if you gave one, to run the payment. - **Kept** for good, as a record of money received. A payment record cannot be deleted while the organization exists. ### How it moves [#how-it-moves] - Order: `POST /payment/organizations/:handle/order` with `amount` in rupees. The API converts to paise, creates a Razorpay order in `INR`, and saves a `payment_orders` row as `created`. - Verify: `POST /payment/organizations/:handle/verify` computes HMAC-SHA256 of `"|"` with `RAZORPAY_KEY_SECRET` and compares it timing-safely. A match marks the order `paid` and adds its paise to `organizations.raised_via_platform_paise` in one transaction; only the call that changes the status credits it. - Without Razorpay keys the API answers 503. - `payment_orders.status` is `created`, `paid` or `failed`; money is stored in paise. | Piece | Where | | --- | --- | | Support window | [`SponsorOrganizationModal.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/features/organizations/components/SponsorOrganizationModal.tsx) | | Service | [`payment.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/payments/payment.service.ts) | | Table | [`order.model.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/payments/order.model.ts) (`payment_orders`) | # Background jobs (/docs/platform/background-jobs) Some work is too slow to do while someone waits, like emailing everyone going to an event. The API writes that work down as a **job**, and a small separate program, the **worker**, does it. ## The life of a job [#the-life-of-a-job] ## What the worker does today [#what-the-worker-does-today] | Job | What it does | | --- | --- | | **Email** | Sends event emails, up to 100 in one go. | | **View totals** | Adds up organization profile views per day for the dashboard. | | **Clean-up** | Deletes finished jobs after a week and failed ones after a month. | ## Good to know [#good-to-know] - The worker sleeps when there is nothing to do, and wakes when the API calls it, when it starts, or once an hour as a safety net. - A job never runs twice by accident: the email service ignores a repeat of the same batch. - There is a daily email limit. Emails over it wait for the next day. - Event reminders, automatic waitlist moves and other timed jobs are not built yet. - Transactional outbox: services call `transactionWithEmails` and `enqueueEmail`, which insert into `jobs` inside the same transaction; after the commit `wakeWorker()` calls `POST /wake` with a bearer secret. - Claim: one `UPDATE` over `SELECT ... FOR UPDATE SKIP LOCKED LIMIT 1`, adding an attempt and moving `run_at` two minutes ahead as a lease. Two jobs run at once, each with a one-minute timeout. - Kinds: `email` (`{"messages":[{"to","subject","html"}]}`, 1 to 100) and `analytics_rollup` (deduplicated per 10 minutes with `dedupe_key`). - Status: `queued`, `done`, `dead`. To rerun a dead job set `status` to `queued` and `attempts` to 0. - Worker endpoints: `POST /wake` (202) and `GET /healthz` (no database). Hourly safety net: [`worker-wake.yml`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/.github/workflows/worker-wake.yml). | Piece | Where | | --- | --- | | Queue (API) | [`job.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/jobs/job.service.ts) | | Worker | [`apps/worker/`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/worker/README.md), [`runner.go`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/worker/runner.go), [`queue.go`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/worker/queue.go) | | Spec | [`docs/specs/worker.md`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/docs/specs/worker.md) | # The data (/docs/platform/data) All of KarmaCircle's data lives in one PostgreSQL database. Here is what it keeps, in plain words. ## How the main data connects [#how-the-main-data-connects] ## What each table holds [#what-each-table-holds] | Table | Holds | Kept for | | --- | --- | --- | | `users` | every login, personal and organization | as long as the account exists | | `organizations` | each organization's profile | as long as it exists | | `organization_follows` | who follows which organization | until unfollowed | | `organization_analytics_events` | single profile visits, with no visitor details | one year | | `organization_view_daily` | profile visits added up per day | for good | | `events` | events, including drafts and cancelled ones | for good; drafts until deleted | | `event_registrations` | one row per person per event | for good; deleted if the person leaves before the start | | `event_invites` | email invitations to events | until taken back | | `payment_orders` | support payments | for good | | `jobs` | the background queue, including emails waiting to go out | 7 days after done, 30 days if failed | | `rate_limits` | counters that stop too many requests | until the time window ends | Who sees each piece, and which outside services receive it: [Your data, in one place](/docs/platform/your-data). ## Good to know [#good-to-know] - Money is stored in paise (100 paise = 1 rupee), so nothing is lost to rounding. - Passwords are stored only as one-way hashes. - Each email address and each organization handle can be used only once. - Tables are defined with Drizzle in each module's `*.model.ts` and exported from [`apps/api/src/db/schema.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/db/schema.ts). - Change the schema, run `pnpm --filter karmacircle-api db:generate`, and commit the generated SQL migration. Never edit generated migration metadata. - Migrations must work with the code already running: add first, remove or rename in a later release. - Related tables point at `organizations.handle` and `users.email`; `payment_orders` uses `restrict` on delete. # Deploy and run locally (/docs/platform/deploy-and-run) ## How a change goes live [#how-a-change-goes-live] - There are two copies of the whole system: **dev** for trying things, and **production** for real people. - The website and the API deploy separately, each only when its own code changed. - The worker runs on Render from a small Docker image. ## Run it on your computer [#run-it-on-your-computer] **Install** Git, Node.js 22, pnpm and PostgreSQL 17 (Go 1.26 too, for the worker). **Set up**: clone the code, run `pnpm install`, and copy the two `.env.example` files to `.env`. **Fill the database**: `pnpm --filter karmacircle-api db:migrate`, then `db:seed` for demo data. **Start**: `pnpm dev`, then open `http://localhost:3000`. | Part | Local address | | --- | --- | | Website | `http://localhost:3000` | | API | `http://localhost:5050` (docs at `/docs`) | | Worker | `http://localhost:8080` | Never point your local setup at the production database. | Workflow | Branch | Deploys | | --- | --- | --- | | `api-production.yml` | `main` | Production API, with migrations | | `api-production-dev.yml` | `dev` | Dev API, with migrations | | `web-prodtest.yml` | `main` | Production website | | `web-production-dev.yml` | `dev` | Dev website | | `worker-wake.yml` | `main` | Nothing; calls the worker's `/wake` hourly | | `ci.yml` | pull requests and reuse | Checks only | - Deploys use `vercel pull`, `vercel build --prod` and `vercel deploy --prebuilt --prod`; deploys of one workflow run one at a time. - Useful commands: `pnpm lint`, `pnpm type-check`, `pnpm build`, `pnpm test`, and `go vet ./...` in `apps/worker`. - Full guide: [`docs/LocalDevSetup.md`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/docs/LocalDevSetup.md). # How it fits together (/docs/platform) KarmaCircle is three small programs that share one database. | Piece | What it does | Built with | | --- | --- | --- | | **Website** | What people see and click in the browser | React | | **API** | Checks every request and reads or saves data | Node.js and Express | | **Worker** | Does slow jobs in the background, like sending emails | Go | | **Database** | Keeps all the data | PostgreSQL | ## The big picture [#the-big-picture] ## What happens on a click [#what-happens-on-a-click] **The browser asks the API**, sending the sign-in cookie along. **The API checks the request**: is the person signed in, allowed, and is the input valid? **The API reads or saves data** in the database and answers. **Slow work is queued.** If emails need sending, the API saves a note for the worker and wakes it up. See [Background jobs](/docs/platform/background-jobs). ## Good to know [#good-to-know] - The website never touches the database. Everything goes through the API. - Images go straight from the browser to storage, never through the API. - Development and production each have their own database. ## Your data [#your-data] Each area lists its own data. The platform itself only adds the records it needs to stay safe and working. Everything in one place: [Your data, in one place](/docs/platform/your-data). ### What we collect [#what-we-collect] | Data | When | Kept for | | --- | --- | --- | | Request logs: time, address asked for, result, network address | Every request to the API | Vercel's standard log period | | Request counters, by network address or account email | Sign-in and other limited actions | Until the time window ends, minutes to an hour | | Background jobs, including the contents of emails waiting to go out | When a change needs an email or a total | 7 days after done, 30 days if it failed | | Error reports: what broke and where, never the request contents | When something crashes, if switched on | Sentry's standard period | Sign-in cookies and passwords are removed from the logs before they are written. ### Why [#why] - **Request logs** help find out what went wrong when someone reports a problem. - **Request counters** stop people from guessing passwords or flooding the site. - **Background jobs** make sure an email is sent even if a service is briefly down. - **Error reports** tell the team about crashes straight away. ### What we do with it [#what-we-do-with-it] - Only the KarmaCircle team can read logs, jobs and error reports. - Nothing here is sold or shared for advertising. - The outside services that host or receive data are listed in [Your data, in one place](/docs/platform/your-data). ### How it moves [#how-it-moves] - Vercel rewrites every API path to one function, `apps/api/api/index.ts`, which waits on a database connection gate (503 on failure) except for `GET /health/live`. - Middleware order: helmet, compression, request logging, CORS allowlist, body parsers, cookie parser, passport, general rate limit, then routes and `errorHandler`. - Each module has `routes`, `controller`, `service`, `validation` and `model` files. Inputs are checked with Zod; signed-in routes use `requireAuth`. - Health: `GET /health/live` (no database) and `GET /health` (503 when the database is down). | Part | Main libraries | | --- | --- | | Web | React 19, Vite, React Router, Tailwind CSS 4, Redux Toolkit, SWR, axios | | API | Express 4, Drizzle ORM, pg, Zod 4, passport (Google), jsonwebtoken, bcryptjs, helmet, pino, Resend, Razorpay | | Worker | Go 1.26, pgx v5, standard library HTTP | | Tooling | pnpm, Turborepo, GitHub Actions, Vercel CLI | [`apps/api/src/app.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/app.ts) builds the app. # Your data, in one place (/docs/platform/your-data) This page sums up the "Your data" sections of every area. Each area explains its own data in full: [Accounts](/docs/accounts#your-data), [Organizations](/docs/organizations#your-data), [Events](/docs/events#your-data), [Payments](/docs/payments#your-data), [Web app](/docs/web-app#your-data) and [Platform](/docs/platform#your-data). ## The short version [#the-short-version] - KarmaCircle collects what it needs to run accounts, organizations, events and support payments, and nothing for advertising. - Personal details are never shown publicly. Organizers see the name and email of people who join their events. - Card, UPI and bank details never reach KarmaCircle. - Nothing is sold or shared with advertisers. ## Who holds or receives data [#who-holds-or-receives-data] | Service | What it does | What it receives | | --- | --- | --- | | **Vercel** | Hosts the website and the API, stores event cover images, counts page visits and load speed | Every request, request logs, uploaded images, anonymous visit and speed numbers | | **Neon** | Hosts the database | Everything KarmaCircle stores | | **Render** | Runs the worker that sends emails | Jobs from the database, including email contents | | **Resend** | Delivers emails | Each recipient's email address and the email's contents | | **Razorpay** | Takes support payments | The amount, the name you chose to give, and the card, UPI or bank details you enter in its window | | **Google** | Optional sign-in | Nothing from KarmaCircle; it sends back your name and email | | **Sentry** | Error reports, when switched on | What broke and where, without names, emails or what you typed | ## How long data is kept [#how-long-data-is-kept] | Data | Kept for | | --- | --- | | Your account | As long as the account exists. Deleting an account is not built yet. | | A password-reset link | One hour, or until used | | An organization and its profile | As long as it exists | | A follow | Until you unfollow | | Organization profile visits | One year. The daily totals made from them are kept. | | Published and cancelled events, and their guest lists | For good | | Draft events | Until the organization deletes them | | Your registration for an event | Until you leave before it starts. A "declined" record is kept. | | An invitation | Until the organizer takes it back | | A support payment | For good, as a record of money received | | An email waiting in the queue | 7 days after it is sent, 30 days if it failed | | Request counters | Until their time window ends, up to an hour | | Request logs, visit stats, error reports | The standard period of Vercel or Sentry | | The sign-in cookie | 30 days, or until you log out | - Retention rules in code: `ANALYTICS_RETENTION_MS` and the periodic purge in [`organization.service.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/api/src/modules/organizations/organization.service.ts), the job clean-up in [`queue.go`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/worker/queue.go), and expired rows in `rate_limits`. - What each table stores: [The data](/docs/platform/data) and each module's `*.model.ts`. - Keep this page and every area's "Your data" section in step with the code (see `AGENTS.md`). # The screens (/docs/web-app) The KarmaCircle website is a set of pages that all talk to the same API. Most pages are open to everyone; the ones for running things need an account. ## How people move around [#how-people-move-around] ## Every page [#every-page] | Page | What it is for | Who | | --- | --- | --- | | Home `/` | What KarmaCircle is, how a drive works, how to help | Anyone | | Sign in or sign up `/auth/signin` | One email-first page | Signed out | | Forgot and reset password | Get a link and choose a new password | Signed out | | Organizations `/organizations` | Search and browse organizations | Anyone | | Organization page `/organization/:handle` | One organization: follow, support, see events | Anyone | | Events `/events` | Search and browse events | Anyone | | Event page `/events/:id` | Details, join, add to calendar | Anyone | | My Events `/events/mine` | Events you attend, and events you host | Signed in | | Edit profile `/user/setup` | Bio, city and address | Signed in | | Organization setup `/organization/setup` | Setup questions, then the profile editor | Organizations | | Dashboard `/dashboard` | Followers, events, support and views | Organizations | | Create, edit, attendees `/organization/events/...` | Run your events | Organizations | ## Good to know [#good-to-know] - Pages load fast because each one downloads only when it is first opened. - Lists load more as you scroll, with grey placeholders while they load. - If something fails, the page says so in plain words and offers to try again. ## Your data [#your-data] ### What we collect [#what-we-collect] What the website keeps in your browser, and what it measures: | Data | Where | Kept for | | --- | --- | --- | | Sign-in cookie | Browser cookie that page scripts cannot read | 30 days, or until you log out | | A "Google sign-in in progress" marker | Browser cookie | Only during a Google sign-in | | Your account details, so pages know you are signed in | Browser storage | Until you log out | | The page to return to after signing in | Browser tab storage | Until the tab closes | | Page visits: which page, the referring site, browser, device type and country | Vercel Web Analytics | Vercel's standard period | | How fast pages load | Vercel Speed Insights | Vercel's standard period | | Error reports, when switched on | Sentry | Sentry's standard period | There are no advertising cookies and no tracking across other websites. Vercel Web Analytics uses no cookies and does not record who you are. Error reports contain what broke, not your name, email or what you typed. ### Why [#why] - **The sign-in cookie** keeps you signed in between pages. - **Saved account details** let the site show your name and the right buttons straight away. - **The return page** brings you back to where you were after signing in. - **Page visits and load speed** show which pages people use and which ones are slow. - **Error reports** let the team fix crashes they would otherwise never hear about. ### What we do with it [#what-we-do-with-it] - Logging out clears the cookie and the saved account details. - Page-visit and speed numbers are only seen as totals in Vercel's dashboard. - Error reports are only seen by the KarmaCircle team in Sentry. ### How it moves [#how-it-moves] - Routes: [`routesConfig.tsx`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/app/routes/routesConfig.tsx). Every page except `/` is lazy-loaded. - Reads use SWR (`useSWR`, and `usePagedList` over `useSWRInfinite` for paged lists); calls go through [`KarmaCircleApi.ts`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/services/KarmaCircleApi.ts) with axios. - The signed-in user lives in Redux (persisted); `SessionBootstrap` re-checks it with `GET /user/profile` on start-up. - The home page also finishes a Google sign-in when the `OAuthLoginInitiated` cookie is present. # Look and feel (/docs/web-app/look-and-feel) KarmaCircle looks warm and calm: cream backgrounds, one clay accent colour, and clear type. The full design system lives at [brand.karmacircle.org](https://brand.karmacircle.org). ## Colours [#colours] | Colour | Hex | Used for | | --- | --- | --- | | Clay | `#a8623e` | the one accent: main buttons, links, focus | | Cream | `#fffcf7` | page background | | Warm cream | `#faf4ec` | banded sections and cards | | Ink | `#212529` | body text | | Dark | `#0e0906` | footer | Status colours: green `#2e6b4a` for success, red `#a8402f` for errors, amber `#8a5a12` for warnings, blue `#3a6a8a` for information. ## Fonts [#fonts] - **Outfit** for headings, buttons and labels. - **Poppins** for paragraphs. ## Layout rules [#layout-rules] - Every screen works from small phones (320 pixels wide) up to very large monitors. - Content is capped to a comfortable width and centred on big screens. - On phones, text and forms are left-aligned with 36 pixels of side padding. - Shared pieces (buttons, dropdowns, loading placeholders) are reused instead of rebuilt. - Tokens live once in the `@theme` block of [`styles/index.css`](https://github.com/karmacircleCommunity/KarmaCircle/blob/main/apps/web/src/styles/index.css); there is no Tailwind config file. - Rule order: shared component, documented pattern, token, Tailwind default, arbitrary value last. - Page shell: `mx-auto max-w-6xl px-9 sm:px-10 lg:px-12`. Radii: inputs `rounded-lg`, dropdowns `rounded-xl`, cards and modals `rounded-2xl`, badges `rounded-full`. - The app's spec: [`docs/specs/design-system/`](https://github.com/karmacircleCommunity/KarmaCircle/tree/main/docs/specs/design-system).