Backer is a Next.js 14 platform that connects founders and investors through short-form pitch content, profile matching, messaging, and investment intent workflows.
- Next.js 14 (App Router) + React 18 + TypeScript
- NextAuth (credentials provider)
- DynamoDB (primary app data store)
- AWS S3 (media uploads)
- AWS SES (optional invite email delivery)
- Prisma (present in repo for schema/client tooling and legacy scripts)
- Founder and investor registration/login
- Founder onboarding/profile + startup/company creation
- Investor onboarding/profile + reels-style feed (
/investor/feed) - Product like/interest and commitment flow
- Founder/investor messaging
- Co-founder invite flow
- Node.js 18+ (recommended: Node.js 20)
- npm
- AWS account/credentials with access to:
- DynamoDB
- S3
- SES (only if you want invite emails)
Create a .env file in the project root. At minimum, configure:
# NextAuth
NEXTAUTH_SECRET="replace-with-a-strong-random-secret"
NEXTAUTH_URL="http://localhost:3000"
# AWS
AWS_REGION="us-east-2"
AWS_PROFILE="your-profile" # or AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY
# S3 uploads
AWS_S3_BUCKET="your-s3-bucket"
AWS_S3_PUBLIC_URL="https://your-bucket.s3.us-east-2.amazonaws.com"
AWS_S3_UPLOAD_PREFIX="uploads"
# Optional S3 custom endpoint/localstack
# AWS_S3_ENDPOINT="http://localhost:4566"
# AWS_S3_FORCE_PATH_STYLE="true"
# Optional SES (co-founder invite emails)
EMAIL_FROM_ADDRESS="no-reply@your-domain.com"
APP_BASE_URL="http://localhost:3000"
# DynamoDB table names
DYNAMODB_TABLE_USERS="backer-dev-users"
DYNAMODB_TABLE_FOUNDERS="backer-dev-founders"
DYNAMODB_TABLE_PRODUCTS="backer-dev-products"
DYNAMODB_TABLE_FOUNDER_PRODUCTS="backer-dev-founder-products"
DYNAMODB_TABLE_FOUNDER_INVITES="backer-dev-founder-invites"
DYNAMODB_TABLE_INVESTORS="backer-dev-investors"
DYNAMODB_TABLE_INVESTOR_INTERESTS="backer-dev-investor-interests"
DYNAMODB_TABLE_FEED_EVENTS="backer-dev-feed-events"
DYNAMODB_TABLE_CONVERSATIONS="backer-dev-conversations"
DYNAMODB_TABLE_MESSAGES="backer-dev-messages"
DYNAMODB_TABLE_INVESTMENTS="backer-dev-investments"
# Optional ML model output path
# FEED_MODEL_PATH="lib/feed/model/feed-model.json"
# Optional local DynamoDB endpoint
# AWS_DYNAMODB_ENDPOINT="http://localhost:8000"Notes:
- Use either
AWS_PROFILEor static access keys, not both. - Do not commit real secrets in
.env.
- Install dependencies:
npm install- Ensure DynamoDB tables exist:
npm run setup:dynamodb- Start the app:
npm run dev- Train the feed model (recommended after generating some usage data):
npm run train:feed-model- Open:
http://localhost:3000
npm run dev- start local dev servernpm run build- production buildnpm run start- start production servernpm run lint- run ESLintnpm run setup:dynamodb- create required DynamoDB tables if missingnpm run train:feed-model- train and persist feed ranking model weights
The investor reels feed uses a trainable logistic ranking model. At request time, each candidate startup is featurized and scored, then sorted by predicted relevance.
- Stage match between investor preference and startup stage
- Investor stage affinity learned from prior investor actions
- Text affinity between investor history/tags and startup content
- Interest tag overlap
- Global product popularity from likes/commitments
- Freshness decay
- Training script:
scripts/train-feed-model.ts - Model artifact output:
lib/feed/model/feed-model.json(orFEED_MODEL_PATH) - Data sources:
investorInterests(LIKED/COMMITTED) for supervised positives- sampled negatives from unseen products per investor
- optional behavioral signal enrichment from
feedEvents
The runtime ranker in lib/feed/ranking.ts loads model weights via lib/feed/model.ts. If no model artifact is found, it falls back to deterministic heuristic scoring.
The feed now records investor interaction events (impressions, watch milestones, product opens, like/unlike, message click, commit) via POST /api/feed/events into DynamoDB table DYNAMODB_TABLE_FEED_EVENTS.
app/- App Router pages and API routescomponents/- UI and feature componentslib/db/- DynamoDB client, table config, repository layerscripts/- local utility/setup scriptsprisma/- Prisma schema/migrations/seed artifacts
Current application runtime reads/writes through lib/db/repository.ts (DynamoDB). Prisma artifacts remain in the repository for schema management/legacy workflows and are not the primary runtime datastore for app features.