Skip to content

nitheshdeva97/Multi_Tracker

Repository files navigation

Multi-Tracker Application

A comprehensive tracking application with beautiful UI that allows users to monitor product prices, gold rates, job opportunities, and medical alerts.

Features

🎨 Frontend

  • Beautiful UI: Soft, rounded design with pastel colors and smooth animations
  • Responsive Design: Works seamlessly across all devices
  • Four Tracker Types:
    • 💙 Product Tracker (price monitoring)
    • 💚 Medical Tracker (blood/organ alerts)
    • 💛 Gold Tracker (price alerts)
    • 🧡 Job Tracker (opportunity matching)
  • Real-time Notifications: In-app and push notifications
  • User Authentication: Secure sign-in/sign-up flow

🔧 Backend

  • RESTful API: Complete backend with Express.js
  • Authentication: JWT-based secure authentication
  • Database: MongoDB with Mongoose ODM
  • Background Tasks: Automated price checking and alerts
  • External Integrations:
    • Product price scraping
    • Gold price APIs
    • Job search APIs
    • Push notifications (Firebase)
    • Email notifications

Tech Stack

Frontend

  • React 18 with TypeScript
  • Tailwind CSS for styling
  • Framer Motion for animations
  • Lucide React for icons
  • React Router for navigation

Backend

  • Node.js with Express.js
  • MongoDB with Mongoose
  • JWT for authentication
  • bcryptjs for password hashing
  • node-cron for background tasks
  • Firebase Admin for push notifications
  • Nodemailer for email notifications

Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB (local or cloud)
  • Firebase project (for push notifications)

Installation

  1. Clone the repository
git clone <repository-url>
cd multi-tracker-app
  1. Install dependencies
npm install
  1. Environment Setup Create a .env file in the root directory:
# Database
MONGODB_URI=mongodb://localhost:27017/multitracker

# JWT
JWT_SECRET=your-super-secret-jwt-key-change-in-production
JWT_EXPIRES_IN=7d

# Server
PORT=5000
NODE_ENV=development

# External APIs
GOLD_API_KEY=your-gold-api-key
RAPIDAPI_KEY=your-rapidapi-key

# Firebase (for push notifications)
FIREBASE_PROJECT_ID=your-firebase-project-id
FIREBASE_PRIVATE_KEY=your-firebase-private-key
FIREBASE_CLIENT_EMAIL=your-firebase-client-email

# Email (for notifications)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password

# Frontend URL
FRONTEND_URL=http://localhost:5173
  1. Start MongoDB Make sure MongoDB is running on your system.

  2. Run the application

Start the backend server:

npm run server:dev

In a new terminal, start the frontend:

npm run dev

The application will be available at:

API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user
  • POST /api/auth/refresh - Refresh JWT token

User Management

  • GET /api/user/profile - Get user profile
  • PUT /api/user/profile - Update user profile
  • PUT /api/user/preferences - Update user preferences

Product Tracking

  • POST /api/product/add - Add product to track
  • GET /api/product/list - Get tracked products
  • GET /api/product/status/:id - Get product status
  • PUT /api/product/:id - Update product
  • DELETE /api/product/:id - Remove product

Medical Alerts

  • GET /api/medical/alerts - Get medical alerts
  • POST /api/medical/alert - Create medical alert
  • POST /api/medical/subscribe - Subscribe to alerts
  • GET /api/medical/subscription - Get subscription

Gold Tracking

  • GET /api/gold/current - Get current gold price
  • POST /api/gold/alert - Set price alert
  • GET /api/gold/alert - Get user's alert
  • GET /api/gold/history - Get price history

Job Tracking

  • POST /api/job/search - Search jobs
  • POST /api/job/subscribe - Subscribe to job alerts
  • GET /api/job/subscriptions - Get subscriptions
  • GET /api/job/trending - Get trending categories

Notifications

  • GET /api/notifications - Get notifications
  • PUT /api/notifications/read/:id - Mark as read
  • PUT /api/notifications/read-all - Mark all as read
  • DELETE /api/notifications/:id - Delete notification

Background Tasks

The application runs several background tasks:

  • Product Price Checking: Every 2 hours
  • Gold Price Monitoring: Every hour
  • Job Alert Processing: Every 4 hours
  • Medical Alert Matching: Every 30 minutes
  • Data Cleanup: Daily at 2 AM

Security Features

  • JWT-based authentication
  • Password hashing with bcryptjs
  • Input validation and sanitization
  • Rate limiting on API endpoints
  • CORS protection
  • Helmet.js security headers

Deployment

Frontend Deployment

The frontend can be deployed to any static hosting service:

npm run build

Backend Deployment

The backend can be deployed to services like Heroku, Railway, or DigitalOcean:

  1. Set environment variables on your hosting platform
  2. Ensure MongoDB is accessible
  3. Configure Firebase and email services
  4. Deploy the application

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors