Skip to content

saurabhhh777/ThePrimeTime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

85 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

The Prime Time - Coding Analytics Platform

A comprehensive coding time tracking and analytics platform that helps developers monitor their productivity, track coding patterns, and optimize their workflow.

๐Ÿš€ Features

VS Code Extension

  • Real-time tracking: Monitors coding sessions, file changes, and language usage
  • Status bar integration: Shows current session time in VS Code status bar
  • Token-based authentication: Secure API token management
  • Automatic data sync: Sends coding statistics to the web dashboard

Web Dashboard

  • Comprehensive analytics: View coding time, sessions, and productivity metrics
  • Language insights: Track time spent on different programming languages
  • Folder analysis: Monitor activity across different project folders
  • Subscription tiers: Free and premium plans with different data retention periods

Subscription Plans

  • Free Plan: Last 30 days data, basic analytics
  • Basic Plan ($9.99/month): Last 3 months data, custom date ranges
  • Pro Plan ($19.99/month): Full year data access, advanced analytics
  • Enterprise Plan ($49.99/month): Unlimited data, custom integrations

๐Ÿ“ Project Structure

ThePrimeTime/
โ”œโ”€โ”€ Extension/                 # VS Code Extension
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ extension.ts      # Main extension file
โ”‚   โ”‚   โ”œโ”€โ”€ codingTracker.ts  # Coding time tracking logic
โ”‚   โ”‚   โ””โ”€โ”€ statusBarManager.ts # Status bar management
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ tsconfig.json
โ”œโ”€โ”€ Backend/                   # Node.js API Server
โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”‚   โ”œโ”€โ”€ codingstats.controller.js
โ”‚   โ”‚   โ”œโ”€โ”€ subscription.controller.js
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ”œโ”€โ”€ codingstats.route.js
โ”‚   โ”‚   โ”œโ”€โ”€ subscription.route.js
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ prisma/
โ”‚   โ”‚   โ””โ”€โ”€ schema.prisma     # Database schema
โ”‚   โ””โ”€โ”€ index.js
โ”œโ”€โ”€ Frontend/                  # React Web Application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Subscription.tsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚   โ””โ”€โ”€ components/
โ”‚   โ””โ”€โ”€ package.json
โ””โ”€โ”€ README.md

๐Ÿ› ๏ธ Installation & Setup

Prerequisites

  • Node.js (v16 or higher)
  • PostgreSQL database
  • VS Code (for extension development)

Backend Setup

  1. Navigate to Backend directory:

    cd Backend
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env file with:

    DATABASE_URL="postgresql://username:password@localhost:5432/primetime"
    JWT_SECRET="your-jwt-secret"
    FRONTEND_URL="http://localhost:5173"
  4. Set up database:

    npx prisma generate
    npx prisma db push
  5. Start the server:

    npm run dev

Frontend Setup

  1. Navigate to Frontend directory:

    cd Frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

VS Code Extension Setup

  1. Navigate to Extension directory:

    cd Extension
  2. Install dependencies:

    npm install
  3. Compile the extension:

    npm run compile
  4. Package the extension:

    npm install -g vsce
    vsce package

๐Ÿ”ง Usage

For Users

  1. Install the VS Code Extension:

    • Download the .vsix file
    • Install in VS Code: Extensions > Install from VSIX
  2. Get your API Token:

    • Sign up at the web dashboard
    • Navigate to your profile to get your API token
  3. Configure the Extension:

    • Open VS Code Command Palette (Ctrl+Shift+P)
    • Run "Set Prime Time Token"
    • Enter your API token
  4. Start Coding:

    • The extension will automatically track your coding sessions
    • View your analytics at the web dashboard

For Developers

  1. API Endpoints:

    • POST /api/v1/coding-stats/submit - Submit coding statistics
    • GET /api/v1/coding-stats/stats - Get user's coding statistics
    • GET /api/v1/subscription/plans - Get subscription plans
    • PUT /api/v1/subscription/user - Update subscription
  2. Database Schema:

    • Users with subscription management
    • Coding statistics with detailed tracking
    • Projects and blogs for additional features

๐Ÿ“Š Analytics Features

Free Plan (30 Days)

  • Basic coding time tracking
  • Language usage statistics
  • File and folder activity
  • Session count and duration

Premium Plans

  • Extended data retention (3 months to unlimited)
  • Custom date range filtering
  • Advanced analytics and reporting
  • Export capabilities
  • API access for integrations

๐Ÿ”’ Security

  • JWT-based authentication
  • Secure API token management
  • Data encryption in transit
  • User privacy protection

๐Ÿš€ Deployment

Backend Deployment

  1. Set up PostgreSQL database
  2. Configure environment variables
  3. Deploy to your preferred platform (Heroku, AWS, etc.)

Frontend Deployment

  1. Build the project: npm run build
  2. Deploy to Vercel, Netlify, or your preferred platform

Extension Distribution

  1. Package the extension: vsce package
  2. Publish to VS Code Marketplace or distribute manually

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

For support and questions:

  • Create an issue in the GitHub repository
  • Check the FAQ section in the web dashboard
  • Contact the development team

๐Ÿ”ฎ Roadmap

  • Team analytics and collaboration features
  • Integration with Git providers
  • Mobile app for on-the-go analytics
  • Advanced reporting and insights
  • Custom integrations and webhooks
  • Machine learning insights for productivity optimization

About

A comprehensive coding time tracking and analytics platform that helps developers monitor their productivity, track coding patterns, and optimize their workflow.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages