- Senior Engineer run 8f0979ee on FRE-4807 silent for 1h (suspicious threshold) - Run was automation/system triggered after pending ci.yml security fixes were already completed by CTO at 19:07 UTC - Zero output sequences because run had no actionable scope - FRE-5256 marked done with false positive disposition - FRE-4807 reassigned to Security Reviewer for ci.yml re-review Co-Authored-By: Paperclip <noreply@paperclip.ing>
3.5 KiB
3.5 KiB
Nessa API Server
Backend infrastructure for Nessa's community features including clubs, challenges, and social sharing.
Features
- Clubs: Create, manage, and join communities around shared interests
- Challenges: Create and participate in time-bound activities within clubs
- Social Feed: Share updates, like posts, and comment within your community network
Tech Stack
- Node.js with Express.js
- SQLite (better-sqlite3) for data persistence
- RESTful API architecture
Getting Started
Prerequisites
- Node.js 18+
- npm
Installation
cd nessa-api
npm install
Running the Server
# Development mode with auto-reload
npm run dev
# Production mode
npm run start
The server will start on http://localhost:3000 by default.
API Endpoints
Health Check
GET /api/health- Service health statusGET /api/health/ready- Readiness checkGET /api/health/live- Liveness check
Clubs
GET /api/clubs- List all clubsGET /api/clubs/:id- Get a specific clubPOST /api/clubs- Create a new clubPUT /api/clubs/:id- Update a clubDELETE /api/clubs/:id- Delete a clubGET /api/clubs/:id/members- Get club membersPOST /api/clubs/:id/members- Join a club
Challenges
GET /api/challenges- List all challengesGET /api/challenges/:id- Get a specific challengePOST /api/challenges- Create a new challengePUT /api/challenges/:id- Update a challengeDELETE /api/challenges/:id- Delete a challengeGET /api/challenges/:id/participants- Get challenge participantsPOST /api/challenges/:id/participants- Join a challengePOST /api/challenges/:id/submissions- Submit challenge progress
Social
GET /api/social/feed- Get user's social feedPOST /api/social/posts- Create a new postGET /api/social/posts/:id- Get a specific postDELETE /api/social/posts/:id- Delete a postPOST /api/social/posts/:id/likes- Like a postDELETE /api/social/posts/:id/likes- Unlike a postPOST /api/social/posts/:id/comments- Comment on a postGET /api/social/posts/:id/comments- Get post comments
Environment Variables
PORT=3000
NODE_ENV=development
Database
The API uses SQLite for data persistence. The database file is created automatically at src/data/nessa.db when the server starts.
Schema
- users - User accounts (simplified, integrates with auth service in production)
- clubs - Community groups
- club_memberships - Club member relationships
- challenges - Time-bound activities
- challenge_participants - Challenge enrollment
- challenge_submissions - Challenge progress tracking
- posts - Social media posts
- likes - Post likes
- comments - Post comments
Testing
npm test
Project Structure
nessa-api/
├── src/
│ ├── config/
│ │ └── database.js # Database setup and schema
│ ├── models/
│ │ ├── Club.js # Club data layer
│ │ ├── Challenge.js # Challenge data layer
│ │ └── Social.js # Social features data layer
│ ├── routes/
│ │ ├── health.js # Health check endpoints
│ │ ├── clubs.js # Club endpoints
│ │ ├── challenges.js # Challenge endpoints
│ │ └── social.js # Social endpoints
│ ├── utils/ # Utility functions
│ └── index.js # Application entry point
├── package.json
└── README.md
License
MIT