Skip to content

Aryan-246/Reality_Check_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

NoCap Mind – Reality Check AI 🧠

A production-level full-stack web app that gives brutally honest AI feedback on your goals.

Tech Stack

Layer Technology
Frontend React + Vite, Tailwind CSS v4, Framer Motion
Backend Node.js + Express, REST API
Database MongoDB (Mongoose)
Auth JWT (jsonwebtoken + bcryptjs)
AI Engine Google Gemini 1.5 Flash (+ OpenAI fallback)

Project Structure

Reality_Check_AI/
├── frontend/               # Vite + React app
│   ├── src/
│   │   ├── components/     # Navbar, ScoreRing, LoadingAI, ProtectedRoute
│   │   ├── context/        # AuthContext (JWT)
│   │   ├── pages/          # Landing, Login, Signup, Dashboard, AnalysisInput, Result
│   │   └── utils/          # api.js (axios)
│   └── vite.config.js
│
└── backend/                # Express API
    ├── config/             # db.js (MongoDB)
    ├── controllers/        # authController.js, analysisController.js
    ├── middleware/         # auth.js (JWT)
    ├── models/             # User.js, Analysis.js
    ├── routes/             # auth.js, analysis.js
    ├── services/           # aiService.js, scoringService.js
    └── server.js

Setup Instructions

Prerequisites


1. Clone / Open Project

cd Reality_Check_AI

2. Configure Backend Environment

Edit backend/.env:

PORT=5000
MONGO_URI=mongodb://localhost:27017/nocap_mind   # or your Atlas URI
JWT_SECRET=change_this_to_a_strong_random_secret
JWT_EXPIRE=7d
GEMINI_API_KEY=your_actual_gemini_api_key_here
AI_PROVIDER=gemini    # or "openai"
OPENAI_API_KEY=       # optional, only if using OpenAI

Get a Gemini API key: Visit https://aistudio.google.com/app/apikey — it's free.


3. Install & Run Backend

cd backend
npm install
npm run dev
# Backend starts on http://localhost:5000

4. Install & Run Frontend

Open a new terminal:

cd frontend
npm install
npm run dev
# Frontend starts on http://localhost:5173

5. Open App

Visit: http://localhost:5173

  1. Create an account
  2. Click "Analyze" in the navbar
  3. Enter your goal, skill level, hours/day, and deadline
  4. Hit "Get My Reality Check"
  5. Receive your brutal honest score + action plan

API Endpoints

Method Endpoint Auth Description
POST /api/auth/signup Register user
POST /api/auth/login Login, get JWT
GET /api/auth/me Get current user
POST /api/analysis Create AI analysis
GET /api/analysis Get history (paged)
GET /api/analysis/:id Get single analysis
PATCH /api/analysis/:id/bookmark Toggle bookmark
DELETE /api/analysis/:id Delete analysis

Scoring System

The Reality Score (0–100) is a blend of:

  • 60% AI Score — Gemini evaluates feasibility given context
  • 40% Rule Score — deterministic scoring based on:
    • Skill level (0–35 pts)
    • Time constraint / days × hours (0–35 pts)
    • Commitment level / hours per day (0–30 pts)

Score Legend

Score Label Meaning
0–20 🚨 Delusion Completely unrealistic
21–40 ⚠️ Very Risky Near impossible given constraints
41–60 ⚡ Possible Hard, requires extreme dedication
61–80 ✅ Achievable Challenging but doable
81–100 🎯 Solid Well within reach

Features

  • 🔒 JWT Authentication — Signup / Login / Session persistence
  • 🧠 AI Analysis — Gemini 1.5 Flash with structured JSON output
  • Voice Input — Web Speech API for goal dictation
  • 📊 Dashboard — History, stats, bookmarks, pagination
  • 🎯 ScoreRing — Animated SVG score indicator (color-coded)
  • 🌙 Cyberpunk Dark Theme — Glassmorphism UI, neon accents

Environment Variables Summary

backend/.env

Variable Description
PORT API port (default: 5000)
MONGO_URI MongoDB connection string
JWT_SECRET Secret for signing JWTs
JWT_EXPIRE Token expiry (e.g. 7d)
GEMINI_API_KEY Your Google Gemini API key
AI_PROVIDER gemini or openai
OPENAI_API_KEY OpenAI key (if using OpenAI)

Built for those who can handle the truth.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors