NanE๏ผๅๆ๏ผๆฏ้ขๅๅไบฌๅคงๅญฆๆ กๅญๅบๆฏ็ๅ ่ดนไบๅฉๅนณๅฐใๅฎๅธฎๅฉๅๅญฆๆๅฎฟ่้ไธดๆถ้ฒ็ฝฎใไปๅฏๅฎๅ จไฝฟ็จ็ๅบๆฅ่ๆใ้ๅคๆนๅธธ่ง่ฏๅ็ฌผ็ปๅ็ฑป็ฉๅๅๅธธ็จๅทฅๅ ท๏ผๅไบซ็ป้่ฟ็ๆญฃ้่ฆ็ไบบใ
ๅนณๅฐ็ๆ ธๅฟไธๆฏไบๆไบคๆ๏ผ่ๆฏๅๆฅผๆ ใๅๅฎฟ่็พคใๅๆ กๅบไผๅ ็ๆ กๅญไบๅฉๆฎๅใNanE ไธๅไนฐๅใไธๅ้ ้ใไธๆไพๅป็ๅปบ่ฎฎ๏ผๅฎๅช่ด่ดฃๆๅฏไฟกใๅฎกๆ ธ่ฟ็ไฟกๆฏๅฑ็คบ็ปๅ้่ๅดๅ ็ๅๅญฆ๏ผๅนถๆไธๆฌกไบๅฉๆฒๆทไธบๅฏ่ฟฝ่ธช็ๅฑฅ็บฆ่ฎฐๅฝใ
| Surface | URL |
|---|---|
| Web app | https://nane.zylatent.com |
| Admin console | https://nane.zylatent.com/admin |
| API health | https://api.zylatent.com/api/health |
| API reference | docs/api/index.md |
ๅฎฟ่็ๆดป้็ปๅธธๅบ็ฐไธไธชๅฐไฝ็ๅฎ็็็พ๏ผๆไบบๅช็จไบไธ็นๅๅฏ่ดดใ็ขไผๆฃ็ญพใ้็ง่ดดใ่ฟๆ่ฏๆ่บไธๅ๏ผๅฉไธ็ไธ่ฅฟ้ฟๆ้ฒ็ฝฎ๏ผๅฆไธไธชๅๅญฆๅดๅฏ่ฝๅจๆทฑๅคใ้จๅคฉใ่่ฏๅจๆ็ชๅๅบๆฏ้ไธดๆถๆฅ้ใ
็ฐๆๆธ ้ๅๆ้ฎ้ข๏ผ
- ๅฎฟ่็พคๅๆๅๅๅๅบๅฟซ๏ผไฝไฟกๆฏๅพๅฟซๆฒๅบ๏ผๆ ๆณๆฒๆทไธบๅฏๆฃ็ดข่ตๆบใ
- ไบๆๅนณๅฐๆด้ๅไบคๆ๏ผไธ้ๅไฝไปท็่ณๅ ่ดน็ๅบๆฅไบๅฉ๏ผ่ฟไผๅผๅ ฅไบคๆๅ้็ไบบไฟกไปปๆๆฌใ
- ๆ กๅญ่ฎบๅใ่กจ็ฝๅข็ญๆธ ้ไฟกๆฏ้็ปๆๅ๏ผๅพ้พๆๆฅผๆ ใๆ กๅบใ็ฑปๅๅๆๆๆๅฟซ้็ญ้ใ
NanE ็่งฃๅณๆนๅผๆฏๆๆ กๅญไบๅฉๆๆๅฏๅฎกๆ ธใๅฏ็ญ้ใๅฏ็กฎ่ฎคใๅฏ่ฏไปท็่ฝป้้ญ็ฏใ
NanE ๆไธๆก็กฌ่พน็๏ผ
- ๅชๅๅ ่ดนไบๅฉ๏ผ็ฆๆญขๆถ่ดน่ฝฌ่ฎฉใๅ็ธไบคๆๅๅไธๅผๆตใ
- ๆๆๅๅธๅ ๅฎกๆ ธ๏ผ็ฉๅ้่ฟไบบๅทฅๅฎกๆ ธๅๆไผๅ ฌๅผๅฑ็คบใ
- ่ฏๅไธฅๆ ผๆถๅฃ๏ผๅชๅ ่ฎธๅธธ่ง้ๅคๆน่ฏ็็ฌผ็ปๅ็ฑป๏ผไธๅฑ็คบๅคๆน่ฏใ็ฎกๅถ่ฏๅๆๅ ทไฝ็จ่ฏๅปบ่ฎฎใ
ๅนณๅฐไธไผๆฟ็จๆทๅคๆญ็ฉๅๆฏๅฆ้ๅไฝฟ็จใ้ขๅ่ ๅจ่็ณปๅ้ขๅๅ๏ผ้่ฆ่ช่กๆฃๆฅๅ ่ฃ ใๆๆๆใไฟๅญ็ถๆๅ้็จ้ฃ้ฉใ
| Area | Status | What It Does |
|---|---|---|
| ้ฆ้กตๅ็ฐ | Done | ๆ็ดขใ็ฑปๅ็ญ้ใๅ็ฑป็ญ้ใๆๆฅผๆ ๅๆขๆต่ง |
| ่ฟ้ปๆๅบ | Done | ๅๆฅผๆ > ๅๅฎฟ่็พค > ๅๆ กๅบ > ๅ ถไปๆ กๅบ |
| ๆฅผๆ ๅจๆ | Done | ๅฑ็คบๆๅฎๆฅผๆ ๆ่ฟๅไบซๅๅทฒ็กฎ่ฎค้ขๅ |
| ็ฉๅๅๅธ | Done | ๆฏๆ่ๆใ่ฏๅใๅทฅๅ ท๏ผๅซๅพ็ใๆฐ้ใๆๆๆใไฝ็ฝฎๅ่็ณปๆนๅผ |
| ไบบๅทฅๅฎกๆ ธ | Done | ็ฎก็ๅๅฏ้่ฟใ้ฉณๅใไธๆถใๆน้ๅค็ |
| ่็ณปๆนๅผไฟๆค | Done | ๆธธๅฎขไธๅฏ่ง่็ณปๆนๅผ๏ผ็ปๅฝๅนถ่กฅๅ จ่ตๆๅไธปๅจๆฅ็ |
| ้ขๅๆ้ | Done | ้ขๅ่ ๆ้ๅๅธ่ ็กฎ่ฎค้ขๅ |
| ๅฑฅ็บฆ่ฏไปท | Done | ๅๅธ่ ๅ้ขๅ่ ๅ่ฏไปทไธๆฌก๏ผๅ ฌๅผๅฑ็คบๆญฃๅๅฏไฟกๆ่ฆ |
| ๆ็้กต้ข | Done | ๆ็ๅๅธใ้ขๅ่ฎฐๅฝใๅพ ่ฏไปท่ฎฐๅฝใ่ดฆๅท่ฎพ็ฝฎ |
| ่ดฆๅท็ณป็ป | Done | NJU ้ฎ็ฎฑ้ช่ฏ็ ใๅฏ็ ็ปๅฝใ้็ฝฎๅฏ็ ใๅๅช่ฎค่ฏไปฃ็ |
| ๅพ็ไธไผ | Done | ๆฏๆๆฌๅฐ/MinIO ๅญๅจใ็ฑปๅๆ ก้ชใๅญคๅฟๅพ็ๆธ ็ |
| ็ฎก็ๅๅฐ | Done | ๅฎกๆ ธใไธพๆฅใ็จๆทใ็ฎก็ๅใๆฅผๆ ๅจๆใ็ป่ฎก |
| PWA/้็ฅ | Partial | Service WorkerใmanifestใWeb Push ้ ็ฝฎๅ ฅๅฃ |
| ๅฐ็จๅบ็ซฏ | Retained | ๅพฎไฟกๅฐ็จๅบไปฃ็ ไฟ็๏ผๅฝๅไธปไบคไปไธบ Web |
ๆธธๅฎขๆต่ง
-> NJU ้ฎ็ฎฑ็ปๅฝ / ๅๅช่ฎค่ฏ
-> ่กฅๅ
จๆต็งฐใๆ กๅบใๆฅผๆ
-> ๅๅธ็ฉๅ
-> ็ฎก็ๅๅฎกๆ ธ
-> ้ฆ้กตๅ
ฌๅผๅฑ็คบ
-> ้ขๅ่
ๆฅ็่็ณปๆนๅผ
-> ็บฟไธ่็ณปไธไบคๆฅ
-> ้ขๅ่
ๆ้ๅทฒ้ขๅ
-> ๅๅธ่
็กฎ่ฎค
-> ๅๆนๅฑฅ็บฆ่ฏไปท
-> ๅฏไฟก่ฎฐๅฝๆฒๆท
NanE ๆฏไธไธชๅ่ฟ็จ Node.js ๆๅก๏ผ่ด่ดฃ้ๆๆไปถใไธๅก APIใ็ฎก็ๅๅฐๅๆฐๆฎๅบๅๅงๅใๅ็ซฏๆฒกๆๆๅปบๆญฅ้ชค๏ผWeb ็ซฏไฝฟ็จๅ็ HTML/CSS/JavaScript๏ผๅ็ซฏไฝฟ็จ Node ๅ
็ฝฎ http ๆจกๅๅ PostgreSQLใ
Browser / Mini Program
-> Nginx HTTPS
-> Node.js service :37878
โโ / web app
โโ /web/* web static files
โโ /admin admin console
โโ /admin/* admin static files
โโ /api/* JSON API
โโ /uploads/* local uploaded images
โโ /assets/* mini-program assets
-> PostgreSQL
server/
โโโ index.js # HTTP server, static serving, router dispatch
โโโ db.js # PostgreSQL pool, schema init, migrations, seed data
โโโ proximity.js # campus/building proximity ranking
โโโ lib/
โ โโโ item-utils.js # item shape, trust summary, icon normalization
โ โโโ jwt.js # signed JWT helpers
โ โโโ logger.js # structured logging
โ โโโ util.js # JSON, body parsing, escaping, helpers
โโโ middleware/
โ โโโ auth.js # verified user and admin guards
โ โโโ rate-limit.js # lightweight login rate limiting
โโโ router/
โ โโโ auth.js # /api/auth/*
โ โโโ items.js # /api/items/* and /api/activity
โ โโโ claims.js # /api/claims/*
โ โโโ me.js # /api/me/*
โ โโโ admin.js # /api/admin/* and /admin
โ โโโ uploads.js # /api/uploads/images
โ โโโ info.js # health, locations, legal docs
โโโ service/
โโโ email.js # SMTP verification and notifications
โโโ image-upload.js # local/MinIO image storage
โโโ nanna.js # ๅๅช API proxy
โโโ push.js # Web Push
web/
โโโ index.html
โโโ manifest.json
โโโ sw.js
โโโ css/
โ โโโ tokens.css
โ โโโ base.css
โ โโโ layout.css
โ โโโ components.css
โ โโโ fa-subset.css
โโโ js/
โโโ app.js # app bootstrap and global state
โโโ api/client.js
โโโ ui/ # dialog, motion, skeleton, toast
โโโ utils/ # date, escape, validate
โโโ views/ # home, publish, mine, settings
| Layer | Technology |
|---|---|
| Web client | Vanilla HTML/CSS/JavaScript |
| Admin console | Vanilla HTML/CSS/JavaScript |
| Mini Program | WeChat Mini Program code retained in miniprogram/ |
| Backend | Node.js native http |
| Database | PostgreSQL via pg |
| Auth | NJU email verification, password login, Nanna proxy, signed JWT |
| SMTP | |
| Images | Local uploads or MinIO-compatible object storage |
| Push | Web Push / VAPID |
| Deployment | Azure VM, Ubuntu, Nginx, PM2, Let's Encrypt |
- Node.js >= 18
- PostgreSQL
- npm
npm installCopy the example file and fill in local values:
cp .env.example .envImportant variables:
PORT=37878
DATABASE_URL=postgres://postgres:postgres@localhost:5432/nane
JWT_SECRET=replace-with-a-long-random-secret
ADMIN_PASSWORD=replace-with-a-strong-admin-password
SMTP_HOST=smtp.qq.com
SMTP_PORT=465
SMTP_USER=your-qq-email@qq.com
SMTP_PASS=replace-with-smtp-authorization-code
PUBLIC_WEB_URL=https://nane.zylatent.com
Optional integrations include NANNA_API_KEY, MinIO settings and VAPID keys. Never commit real .env values.
npm startOpen:
http://localhost:37878
http://localhost:37878/admin
http://localhost:37878/api/health
On startup, the server initializes the database schema, applies compatibility migrations and inserts seed data when needed.
npm testnpm test starts an isolated test API server and runs the Node test suite. Current suite coverage includes:
- public health, legal and locations endpoints
- guest browsing
- auth validation
- protected route boundaries
- item list/detail flows
- admin stats/items/activity APIs
- trust summary and fulfillment review helpers
- proximity ranking
- utility functions
Run tests against an already running server:
npm run test:directUse NANE_TEST_BASE_URL to point direct tests at another server.
Production currently runs on an Azure VM behind Nginx and PM2.
cd ~/apps/NanE
git pull --ff-only
npm install
pm2 restart nane-api --update-envHealth check:
curl https://api.zylatent.com/api/health
pm2 status
pm2 logs nane-api --lines 80Full notes are in docs/deployment-guide.md.
A short demo path for product review:
- Open the home page and show nearby items.
- Use search, category filters and "ๆขไธชๆฅผๆ " to show cross-campus building browsing.
- Open an item detail and show that contact info is hidden for guests.
- Log in with a verified user and complete profile.
- Publish an item and show it enters review.
- Log into the admin console and approve it.
- Return to the home page, view contact info, and send a claim reminder.
- Confirm the claim from the publisher side.
- Submit fulfillment review tags.
- Show the trust summary and admin building activity panel.
More detailed scripts:
| Document | Purpose |
|---|---|
| docs/api/index.md | API reference |
| docs/deployment-guide.md | production deployment and operations |
| docs/test-guide.md | manual acceptance test guide |
| docs/ROADMAP.md | staged engineering roadmap |
| docs/iteration-fulfillment-review.md | fulfillment review MVP notes |
| docs/iteration-admin-convergence.md | admin convergence notes |
| docs/user-agreement.md | user agreement |
| docs/privacy-guideline-draft.md | privacy guideline draft |
| CHANGELOG.md | historical changes |
- Public item lists never expose WeChat, QQ or room number.
- Contact info is returned only through the dedicated contact endpoint.
- Admin views include sensitive details and require admin JWT.
- Location matching uses campus/building data instead of GPS.
- Item posts require manual review before becoming public.
- The project currently keeps CORS permissive for mini-program compatibility; tighten this before broader production rollout.
.env, SMTP credentials, JWT secrets, MinIO keys and Nanna keys must stay out of Git.
NanE is a deployable competition MVP with several post-MVP refinements already included:
- backend router/module split
- responsive Web UI and dark mode
- service worker cache
- image upload and cleanup
- fulfillment review and trust summary
- admin reports, users, roles and building activity
- API smoke/regression tests
Next likely directions:
- migrate remaining compatibility DDL into explicit migration files
- expand item/service taxonomy with stricter review rules
- add admin audit search for reviews and abnormal users
- improve CORS/security headers and request body limits
- bring mini-program release flow back after deployment constraints are cleared
No open-source license is currently declared in this repository. Treat the code and project materials as private unless a license is added.
NanE is built around a simple campus idea: nearby students can help each other faster than a marketplace can. The project uses Node.js, PostgreSQL, Font Awesome Free, Web Push and the Nanjing University campus context to turn that idea into a working product loop.