Backend API Overview

Production-ready NestJS backend API for AI services, authentication, and analytics

Backend API Overview

The Backend API is a production-ready NestJS application that provides secure AI proxy services, user authentication, and usage analytics for the GoGrab platform.

Key Features

🔐 Authentication & Authorization

🤖 AI Proxy Services

📊 Analytics & Tracking

🔒 Security Features

Architecture

Backend API
├── Auth Module          # User authentication & JWT
├── AI Module            # AI proxy for all providers
├── Analytics Module     # Usage tracking & stats
└── MongoDB Integration  # Data persistence

Quick Start

1. Install Dependencies

yarn install --ignore-engines

2. Configure Environment

Create .env.local in project root:

MONGODB_CONNECTION_STRING=mongodb+srv://...
MONGODB_DATABASE=gograb-api
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=...
JWT_SECRET=your-secret-key

3. Start the Server

npx nx serve backend-api

Server will run on: http://localhost:3000/api

API Endpoints

Authentication

AI Services (Requires Auth)

Analytics (Requires Auth)

Technologies Used

Next Steps

Project Structure

apis/backend-api/
├── src/
│   ├── app/
│   │   ├── auth/          # Authentication module
│   │   ├── ai/            # AI proxy module
│   │   └── app.module.ts  # Root module
│   └── main.ts            # Application entry
libs/
├── api-contracts/         # Shared types (FE/BE)
└── backend-core/          # MongoDB schemas

Support

For issues or questions:

  1. Check the Troubleshooting Guide
  2. Review the API Reference
  3. See the Setup Guide