Skip to content

Wizard74-Star/AIO-Beta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

120 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AIO Blockchain - Brand Analysis & Content Optimization Platform

A full-stack application for analyzing brand visibility across AI models and optimizing content for better AI discoverability.

🚀 Features

  • Brand Insight Analysis - Compare your brand's AI visibility against competitors across multiple AI models (ChatGPT, Gemini, Grok, Perplexity)
  • Content Optimizer - Analyze and optimize content for both AI models and human readers
  • Prompt Preview - Test how AI models respond to prompts before publishing
  • User Authentication - Secure JWT-based auth with OAuth support (Google, GitHub, Microsoft)
  • Audit Management - Track and manage brand analysis audits with detailed metrics

📁 Project Structure

Aio-blockchain/
├── frontend/          # Next.js frontend application
│   ├── src/
│   │   ├── app/       # Next.js App Router pages
│   │   ├── components/ # React components
│   │   ├── api/       # API hooks and clients
│   │   └── sections/  # Page sections
│   └── package.json
│
├── backend/           # Node.js/Express backend API
│   ├── src/
│   │   ├── controllers/ # Route handlers
│   │   ├── models/      # Database models
│   │   ├── routes/      # API routes
│   │   └── utils/      # Helper functions
│   └── package.json
│
└── README.md

🛠️ Tech Stack

Frontend

  • Framework: Next.js 15 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS + shadcn/ui
  • State Management: React Query (TanStack Query)
  • UI Components: Radix UI via shadcn/ui

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB with Mongoose
  • Authentication: JWT
  • Validation: Express Validator

📦 Prerequisites

  • Node.js 18+
  • MongoDB (local or cloud instance)
  • npm or yarn

🚀 Getting Started

1. Clone the Repository

git clone <repository-url>
cd Aio-blockchain

2. Backend Setup

cd backend

# Install dependencies
npm install

# Copy environment file
cp env.example .env

# Edit .env with your configuration:
# - MONGODB_URL: MongoDB connection string
# - JWT_SECRET: Secret for JWT tokens
# - AI Provider API keys (OpenAI, Gemini, Grok, Perplexity)
# - Email configuration (for password reset)

# Start development server
npm run dev

Backend runs on http://localhost:8000

3. Frontend Setup

cd frontend

# Install dependencies
npm install

# Copy environment file (if exists) or create .env.local
# Add these variables:
# NEXT_PUBLIC_BASE_API_URL=http://localhost:8000
# NEXT_PUBLIC_ACCESS_TOKENKEY=access_token
# NEXT_PUBLIC_REFRESH_TOKENKEY=refresh_token

# Start development server
npm run dev

Frontend runs on http://localhost:3000

🔑 Environment Variables

Backend (.env)

PORT=8000
MONGODB_URL=mongodb://localhost:27017/aio-blockchain
JWT_SECRET=your-secret-key
FRONTEND_URL=http://localhost:3000
OPENAI_API_KEY=your-key
GEMINI_API_KEY=your-key
# ... see backend/env.example for full list

Frontend (.env.local)

NEXT_PUBLIC_BASE_API_URL=http://localhost:8000
NEXT_PUBLIC_ACCESS_TOKENKEY=access_token
NEXT_PUBLIC_REFRESH_TOKENKEY=refresh_token

📡 API Endpoints

Authentication

  • POST /api/v1/auth/signup - User registration
  • POST /api/v1/auth/login - User login
  • POST /api/v1/auth/social-login - OAuth login
  • POST /api/v1/auth/forgot-password - Password reset
  • POST /api/v1/auth/verify-code - Verify code
  • POST /api/v1/auth/reset-password - Reset password

Brand Analysis

  • POST /api/v1/audit/run - Run brand analysis
  • GET /api/v1/audit/history - Get audit history
  • GET /api/v1/audit/overview/:id - Get audit overview
  • GET /api/v1/audit/providers/status - AI provider status

Content Optimization

  • POST /api/v1/content/analyze - Analyze content from URL
  • POST /api/v1/content/preview - Preview AI responses

See backend/API_ENDPOINTS.md for complete API documentation.

🏃 Development

Backend

cd backend
npm run dev    # Development with nodemon
npm start      # Production

Frontend

cd frontend
npm run dev    # Development server
npm run build  # Production build
npm start      # Production server

📝 Scripts

Backend

  • npm start - Start production server
  • npm run dev - Start development server with auto-reload

Frontend

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Start production server
  • npm run lint - Run ESLint

🔒 Authentication

The application uses JWT-based authentication:

  • Access tokens stored in localStorage
  • Tokens included in Authorization: Bearer <token> header
  • OAuth support for Google, GitHub, and Microsoft

🗄️ Database

MongoDB is used for data storage with Mongoose ODM:

  • Users - User accounts and authentication
  • Audits - Brand analysis results and history

🎨 UI Components

The frontend uses shadcn/ui components built on Radix UI:

  • Fully accessible
  • Customizable with Tailwind CSS
  • TypeScript support

About

AIO-Beta

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors