Unified account portal for SoftBridge Labs, built with Next.js App Router, React 19, and Firebase Auth.
npm install
npm run devOpen http://localhost:3000.
Create a .env.local file with the required public values:
NEXT_PUBLIC_API_BASE_URL=https://api.softbridgelabs.in
NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=...
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...Base URL: https://api.softbridgelabs.in
Endpoint: POST /softbridge/register
Body:
{
"email": "user@example.com",
"password": "strong-password",
"name": "John Doe"
}Endpoint: POST /softbridge/login
Body:
{
"email": "user@example.com",
"password": "strong-password"
}Triggers a password reset email via Firebase.
Endpoint: POST /softbridge/forgot-password
Body:
{
"email": "user@example.com"
}Send custom security alerts to users using the Resend service.
Endpoint: POST /softbridge/alert-email
Body:
{
"email": "user@example.com",
"type": "login",
"details": "New login from Chrome on Windows"
}Supported types: login, password_change, premium_activated.
Activates premium status for a user for a specific duration.
Endpoint: POST /softbridge/premium/activate
Body:
{
"uid": "firebase_uid",
"durationDays": 30
}Fetch restricted profile details for any user.
Endpoint: GET /softbridge/profile/:uid
Initializes or performs a full update of the SoftBridge account.
Endpoint: POST /softbridge/account
Body:
{
"uid": "firebase_uid",
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"avatar_url": "https://...",
"birthday": "1990-01-01",
"gender": "Male",
"bio": "Developer at SoftBridge Labs"
}Updates specific fields without affecting others.
Endpoint: PATCH /softbridge/account
Body:
{
"uid": "firebase_uid",
"bio": "Updated bio text"
}Fetches the profile info, premium status, and optional setup guidance.
Endpoint: GET /softbridge/account
Query parameters:
uid(required): User unique ID.setupHelp(optional): Set totrueto receive onboarding steps.
Review recent actions performed on your account.
Endpoint: GET /softbridge/activity
Query parameter: uid
A helper route that redirects any hit to the unified account dashboard.
Endpoint: GET /softbridge/auth-redirect
Redirects to: https://account.softbridgelabs.in
Permanently removes account data from SQL systems.
Endpoint: DELETE /softbridge/account
Body:
{
"uid": "firebase_uid"
}npm run dev- start local development servernpm run build- build for productionnpm run start- run production servernpm run lint- run ESLint