Skip to content

krina2005/Neuronix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 NeuroNix - Brain Performance Dashboard

NeuroNix Banner

Monitor Your Brain Like a System | Optimize Your Cognitive Performance

TypeScript React Node.js MongoDB License: MIT


🎯 About

NeuroNix is a cutting-edge brain performance monitoring dashboard that helps developers, students, and professionals track their cognitive performance in real-time. By analyzing key factors like sleep, study hours, stress levels, and caffeine intake, NeuroNix provides actionable insights to optimize mental performance.

Think of it as a system monitor for your brain - just like how you monitor your computer's CPU, RAM, and processes, NeuroNix monitors your focus level, logic power, error rate, and mental capacity.


✨ Features

🎯 Core Metrics

  • Focus Meter: Real-time concentration level tracking (0-100%)
  • Logic Power: Problem-solving capability assessment
  • Bug Count: Mental error rate monitoring
  • Coffee Dependency: Caffeine impact analysis
  • Brain RAM Usage: Mental capacity utilization (0-4 GB)

πŸ“Š Smart Analytics

  • Cognitive Engine: Advanced algorithm that calculates metrics based on:

    • Sleep hours (optimal: 7-8 hours)
    • Study/work hours
    • Stress levels (optimal: 2-4/10)
    • Coffee/tea intake
  • Dynamic Recommendations: Context-aware tips for performance improvement

  • Error Logging: Detailed insights into cognitive performance issues

  • Visual Gauges: Beautiful circular progress indicators

  • Status Labels: Instant feedback on your current state

πŸ” User Features

  • Secure Authentication: JWT-based login system
  • Persistent Storage: MongoDB for user data and statistics
  • Session Management: Automatic token handling
  • Protected Routes: Secure dashboard access

🎨 UI/UX

  • Glassmorphism Design: Modern frosted glass effects
  • Smooth Animations: Framer Motion for fluid interactions
  • Responsive Layout: Works on all screen sizes
  • Dark Mode: Eye-friendly cyberpunk theme
  • Interactive Components: Real-time visual feedback

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
React 19 UI framework with latest features
TypeScript Type-safe development
Vite Lightning-fast build tool
Tailwind CSS 4 Utility-first styling
Framer Motion Smooth animations
React Router Client-side routing
Recharts Data visualization
Axios HTTP client
Lucide React Beautiful icons

Backend

Technology Purpose
Node.js JavaScript runtime
Express.js 5 Web framework
MongoDB NoSQL database
Mongoose MongoDB ODM
JWT Authentication
bcryptjs Password hashing
CORS Cross-origin requests

Development Tools

  • ESLint: Code linting
  • TypeScript ESLint: TS-specific linting
  • Vitest: Unit testing
  • Nodemon: Auto-restart server

πŸš€ Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js >= 20.0.0
  • npm >= 8.0.0
  • MongoDB >= 6.0 (local or Atlas)
  • Git

Installation

  1. Clone the repository
git clone https://github.com/krina2005/Neuronix.git
cd Neuronix
  1. Install Backend Dependencies
cd backend
npm install
  1. Install Frontend Dependencies
cd ../frontend
npm install

Environment Variables

Backend (.env)

Create a .env file in the backend directory:

# MongoDB Connection
MONGODB_URI=mongodb://localhost:27017/cs-brain-dashboard

# Or use MongoDB Atlas:
# MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/neuronix?retryWrites=true&w=majority

# JWT Secret (generate a strong random string)
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production

PORT=5000

Frontend (.env)

Create a .env file in the frontend directory (optional):

VITE_API_URL=http://localhost:5000/api

Running the Application

  1. Start MongoDB
# If using local MongoDB
mongod
  1. Start Backend Server
cd backend
npm run dev

Server will run on http://localhost:5000

  1. Start Frontend Development Server
cd frontend
npm run dev

Frontend will run on http://localhost:3000

  1. Open your browser

Navigate to http://localhost:3000


πŸ“– Usage

1. Sign Up

  • Navigate to the signup page
  • Create an account with your name, email, and password
  • You'll be automatically logged in and redirected to the dashboard

2. Configure Your Metrics

Input your current status:

  • Sleep Hours: How many hours you slept last night
  • Study Hours: How long you've been studying/working
  • Coffee Intake: Number of cups consumed
  • Stress Level: Rate your current stress (0-10)

3. Calculate Brain Stats

Click "Calculate Brain Stats" to analyze your cognitive performance

4. View Results

Monitor your:

  • Focus Level: Your current concentration capability
  • Logic Power: Problem-solving strength
  • Bug Count: Mental error frequency
  • Coffee Dependency: Caffeine reliance percentage
  • Brain RAM Usage: Mental capacity utilization

5. Follow Recommendations

Review the personalized tips and error logs to optimize your performance


πŸ“ Project Structure

Neuronix/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── authMiddleware.js      # JWT authentication
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ User.js                # User schema
β”‚   β”‚   └── BrainStats.js          # Stats schema
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ auth.js                # Auth endpoints
β”‚   β”‚   └── stats.js               # Stats endpoints
β”‚   β”œβ”€β”€ .gitignore
β”‚   β”œβ”€β”€ package.json
β”‚   └── server.js                  # Express server setup
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ ErrorLog.tsx       # Error display
β”‚   β”‚   β”‚   β”œβ”€β”€ Gauge.tsx          # Circular gauge
β”‚   β”‚   β”‚   β”œβ”€β”€ InputPanel.tsx     # Input controls
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.tsx         # Navigation bar
β”‚   β”‚   β”‚   β”œβ”€β”€ ProtectedRoute.tsx # Auth guard
β”‚   β”‚   β”‚   └── StatCard.tsx       # Stat display card
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx      # Main dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ Landing.tsx        # Home page
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.tsx          # Login page
β”‚   β”‚   β”‚   └── Signup.tsx         # Signup page
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   └── cognitiveEngine.ts # Stats calculation
β”‚   β”‚   β”œβ”€β”€ types/
β”‚   β”‚   β”‚   └── index.ts           # TypeScript types
β”‚   β”‚   β”œβ”€β”€ api.ts                 # Axios instance
β”‚   β”‚   β”œβ”€β”€ App.tsx                # Main app component
β”‚   β”‚   β”œβ”€β”€ index.css              # Global styles
β”‚   β”‚   └── main.tsx               # Entry point
β”‚   β”œβ”€β”€ .gitignore
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   └── vite.config.ts
β”‚
└── README.md

πŸ”Œ API Endpoints

Authentication

POST /api/auth/signup

Register a new user

POST /api/auth/login

Login existing user

Brain Statistics

GET /api/stats

Get user's brain statistics (Protected)

POST /api/stats

Save/update brain statistics (Protected)

Headers:

Authorization: Bearer <token>

Request Body:

{
  "focusLevel": 85,
  "logicPower": 78,
  "bugCount": 12,
  "coffeeDependency": 37,
  "brainRamUsage": 2.3
}

Response:

{
  "message": "Stats saved successfully",
  "stats": { /* stats object */ }
}

🏠 Landing Page

Beautiful cyberpunk-themed landing page with feature showcase

🎯 Dashboard

Real-time brain performance monitoring with interactive gauges

πŸ“Š Analytics

Detailed metrics and personalized recommendations

πŸ” Authentication

Secure login and signup with modern UI


πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.


πŸ“¬ Contact

Krina Parmar

Project Link: https://github.com/krina2005/Neuronix


πŸ™ Acknowledgments


⭐ Star this repository if you found it helpful!

Made with ❀️ by Krina Parmar

Monitor your brain, optimize your life 🧠✨

About

A full-stack brain performance dashboard that analyzes cognitive metrics like focus, stress, and productivity using a custom algorithm, providing real-time insights and personalized recommendations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors