AI-powered digital knowledge twin platform where users create comprehensive profiles through conversational onboarding, and guests can ask questions answered by AI.
- AI-Powered Onboarding: Dynamic questionnaire that adapts based on user responses
- Semantic Search: Vector embeddings for intelligent question matching
- Background Processing: Async normalization of Q&As into structured data
- Rate Limiting: Per-user and site-wide limits
- Three-Tier System: Free, Pro, and Business tiers
- Admin Panel: User management, tier configuration, job monitoring
- Backend: Node.js 18+, Express, TypeScript
- Database: PostgreSQL 15+ with pgvector extension
- Cache: node-cache (in-memory)
- Queue: Custom database-backed queue
- AI: OpenAI API (GPT-4 + text-embedding-3-small)
- Node.js 18+
- Docker and Docker Compose
- OpenAI API key
git clone <repository-url>
cd askaboutme
npm installcp .env.example .envEdit .env and add your configuration:
# Required
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/askaboutme
JWT_SECRET=your-secret-key-here
OPENAI_API_KEY=sk-your-openai-key-here
# Optional
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=secure-passworddocker-compose up -dThis starts PostgreSQL in a Docker container.
npm run migratenpm run seedThis creates an admin user if ADMIN_EMAIL and ADMIN_PASSWORD are set.
# Terminal 1: API Server
npm run dev
# Terminal 2: Background Workers
npm run workerThe API will be available at http://localhost:3000.
GET /healthPOST /api/auth/register- Register new userPOST /api/auth/login- LoginGET /api/auth/me- Get current userPUT /api/auth/password- Change passwordDELETE /api/auth/account- Delete account
GET /api/onboarding/session- Get/create onboarding sessionPOST /api/onboarding/answer- Submit answerPOST /api/onboarding/complete- Complete onboardingGET /api/onboarding/resume- Resume incomplete session
GET /api/profile/overview- Get profile overview and statsGET /api/profile/qas- Get Q&A history (paginated, filterable)PUT /api/profile/qas/:id- Update a Q&A answerDELETE /api/profile/qas/:id- Delete a Q&AGET /api/profile/entities- Get extracted entitiesPOST /api/profile/reprocess- Reprocess all Q&AsGET /api/profile/guest-questions- Get questions from guestsPOST /api/profile/guest-questions/:id/improve- Improve guest answer
GET /api/ask/:username- Get user's public profilePOST /api/ask/:username- Ask a questionGET /api/ask/:username/conversation/:conversationId- Get conversation historyGET /api/ask/:username/rate-limit- Check rate limit status
GET /api/admin/users- List all users (paginated, filterable)GET /api/admin/users/:userId- Get user detailsPOST /api/admin/users/:userId/suspend- Suspend userPOST /api/admin/users/:userId/unsuspend- Unsuspend userDELETE /api/admin/users/:userId- Delete userGET /api/admin/stats- Get platform statisticsGET /api/admin/tier-configs- Get tier configurationsPUT /api/admin/tier-configs/:tierName- Update tier configGET /api/admin/jobs- List background jobs
GET /api/tiers/current- Get current tier infoGET /api/tiers/available- List available tiersPOST /api/tiers/upgrade- Request tier upgradeGET /api/settings- Get user settingsPUT /api/settings- Update settingsPUT /api/settings/visibility- Update profile visibility
GET /api/jobs- List user's jobsGET /api/jobs/:jobId- Get job statusGET /api/jobs/status- Get jobs overview
See docs/tech-doc.md for complete API documentation.
/src
/db - Database connection and migrations
/middleware - Auth, validation, rate limiting
/queue - Bull queue and job processors
/routes - API route handlers
/services - Business logic layer
/types - TypeScript type definitions
/utils - Helpers and utilities
app.ts - Express app configuration
index.ts - API server entry point
worker.ts - Background worker entry point
/docs - Documentation
prd.md - Product Requirements
tech-doc.md - Technical Implementation
architecture-decisions.md - Architecture decisions
npm run dev # Start API server in development mode
npm run worker # Start background worker
npm run build # Compile TypeScript
npm run start # Start production server
npm run migrate # Run database migrations
npm run seed # Seed database
npm test # Run tests
npm run commitico "message" # Commit changes# Run all tests
npm test
# Run with coverage
npm run test:coverage- Build the project:
npm run build-
Set production environment variables
-
Run migrations:
npm run migrate- Start services:
# Start API server
npm start
# Start worker (in separate process)
npm run workerSee .env.example for all available configuration options.
MIT
For issues and questions, please open an issue on GitHub.