How to run Curate locally. For the contribution workflow (fork, branch, PR), see CONTRIBUTING.md.
- Node.js 18 or newer
- npm
- MongoDB (local or a connection string)
git clone https://github.com/DevOlabode/curate.git
cd curate
npm install
cp .env.example .envSet at least:
MONGO_URISESSION_SECRETJWT_SECRET
See .env.example for the rest. Never commit .env. Never put those secrets in extension/ or src/shared/.
npm run dev| URL | What |
|---|---|
http://localhost:3000/api/v1 |
JSON API |
http://localhost:3000/api/v1/health |
Liveness |
http://localhost:3000 |
Express-rendered landing |
http://localhost:3000/privacy |
Privacy |
http://localhost:3000/forgot-password |
Password reset pages |
npm run build:extensionOutput: dist/extension/.
In Chrome (chrome://extensions) or Edge (edge://extensions):
- Turn on Developer mode.
- Load unpacked.
- Select
dist/extension/.
Open Details → Extension options and set environment to Development (http://localhost:3000). That page is for developers. It is not in the popup.
After you change popup, options, or src/shared/ code:
npm run build:extensionThen reload the extension on chrome://extensions / edge://extensions.
More: extension/README.md.
The public site is static files in landing/. No Node or Mongo.
cd landing
npx serve .Vercel: set Root Directory to landing, framework Other, empty build and output. Do not run node index.js on Vercel. See landing/README.md.
| Script | Description |
|---|---|
npm run dev |
API + Express pages (nodemon) |
npm start |
Production server |
npm test |
Automated test suite (node --test) |
npm run test:watch |
Automated test suite in watch mode |
npm run build:extension |
Bundle unpacked extension to dist/extension/ |
The popup uses Bearer JWT against /api/v1.
| Method | Path | Notes |
|---|---|---|
GET |
/health |
Liveness |
POST |
/auth/register |
Create account |
POST |
/auth/login |
Returns { token, user } |
GET |
/auth/me |
Current user |
PUT |
/auth/me |
Update profile |
PUT |
/auth/password |
Change password |
DELETE |
/auth/me |
Delete account and library |
POST |
/auth/logout |
Client still clears the token |
GET/POST |
/bookmarks |
List / create |
PUT/DELETE |
/bookmarks/:id |
Update / delete |
GET/POST |
/collections |
List / create |
GET/PUT/DELETE |
/collections/:id |
One collection |
Password reset is HTML at /forgot-password so the extension can open it in a tab.
npm testRuns node --test against app.js (the Express app, exported separately from
index.js so it can be exercised without a real HTTP server or a real
database). It covers:
tests/api/auth.test.js- registration, login,/auth/me, account deletiontests/api/bookmarks.test.js- bookmark CRUD, ownership, validationtests/api/collections.test.js- collection CRUD, ownership, validationtests/unit/validators.test.js-normalizeUrl,parseTags, Joi schemas
Tests run against a throwaway MongoDB started in memory by
mongodb-memory-server - no local MongoDB, MONGO_URI, or other setup is
needed, and your dev/production data is never touched. CI runs npm test and
npm run build:extension on every push and pull request.
There is still no end-to-end UI suite. Manually check the flow you changed in the loaded unpacked extension.
See architecture.md.