diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d2e4fd8 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# Set default behavior to automatically normalize line endings +* text=auto eol=lf +*.bat eol=crlf +*.cmd eol=crlf diff --git a/.prettierrc b/.prettierrc index a6d7575..8471d0b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -9,5 +9,5 @@ "bracketSpacing": true, "bracketSameLine": false, "arrowParens": "always", - "endOfLine": "lf" + "endOfLine": "auto" } diff --git a/BLOG.md b/BLOG.md index 0342560..2a57824 100644 --- a/BLOG.md +++ b/BLOG.md @@ -1,10 +1,10 @@ # Say Goodbye to Gridlocks: How TraffiTech is Automating Smart Cities with AI and IoT -We’ve all been there: stuck at a red light on an entirely empty intersection, or circling the block for the fifth time just looking for a place to park. +We’ve all been there: stuck at a red light on an entirely empty intersection, or circling the block for the fifth time just looking for a place to park. -In modern cities, traffic and parking systems operate as isolated silos. Static traffic light timers don’t care about actual road density, and drivers looking for parking space search passively, contributing to **up to 30% of urban congestion**. Most critically, emergency vehicles like ambulances face life-threatening delays navigating gridlocked intersections. +In modern cities, traffic and parking systems operate as isolated silos. Static traffic light timers don’t care about actual road density, and drivers looking for parking space search passively, contributing to **up to 30% of urban congestion**. Most critically, emergency vehicles like ambulances face life-threatening delays navigating gridlocked intersections. -To solve this, I built **TraffiTech**—an AI-powered, IoT-integrated cyber-physical system designed to optimize large-scale traffic control and parking allocation in real-time. +To solve this, I built **TraffiTech**—an AI-powered, IoT-integrated cyber-physical system designed to optimize large-scale traffic control and parking allocation in real-time. Here is a deep dive into how TraffiTech works, the technical engine under the hood, and how it's shaping the future of smart city infrastructure. @@ -19,31 +19,36 @@ Instead of separating navigation and parking, TraffiTech unites them into a sing Here are the key pillars that make TraffiTech unique: ### 1. AI-Powered Traffic Autopilot -Traditional traffic lights run on pre-programmed cycles. TraffiTech uses virtual IoT road sensors to continuously stream vehicle density counts. The system’s **AI Autopilot** evaluates these density thresholds in real-time and dynamically extends green-light cycles for heavily congested lanes while shortening green phases for empty corridors. + +Traditional traffic lights run on pre-programmed cycles. TraffiTech uses virtual IoT road sensors to continuously stream vehicle density counts. The system’s **AI Autopilot** evaluates these density thresholds in real-time and dynamically extends green-light cycles for heavily congested lanes while shortening green phases for empty corridors. ### 2. Life-Saving SOS Corridors + Every second counts during a medical or fire emergency. TraffiTech features a manual **Emergency Corridor Override**. With a single click, dispatchers or first responders can force a continuous green-light pathway along the emergency vehicle's route, proactively clearing traffic gridlocks before the vehicle even arrives at the intersection. ### 3. Contactless Smart Parking & Dynamic Pricing + Drivers can open the TraffiTech mobile app to locate vacant parking spots on an interactive, geolocation-aware map. To balance parking gridlocks during peak hours, the system automatically triggers dynamic surge pricing. Once a spot is selected, users book it securely using Stripe and receive a digital QR ticket. Scanning this QR pass at the physical gate updates the live database occupancy immediately. ### 4. Eco-Smart Infrastructure (Smart Streetlighting) + To reduce municipal energy costs, TraffiTech links density sensors to streetlighting networks. During off-peak night hours, streetlights automatically dim by up to 50% when the road is empty and instantly return to 100% brightness as vehicles approach, reducing grid loads by up to 40%. --- ## Under the Hood: The Tech Stack -Building a real-time smart city dashboard requires high performance, security, and absolute reliability. +Building a real-time smart city dashboard requires high performance, security, and absolute reliability. -* **Frontend:** Built as a Progressive Web Application (PWA) using **React 19** and **Vite** for rapid rendering. **Tailwind CSS** handles the styling, **Leaflet** powers the interactive maps, and **Recharts** handles live analytics. -* **Backend:** Powered by **Node.js** and **Express.js**. I used **Socket.io** to establish persistent, bi-directional WebSocket streams to handle the real-time IoT signal cycles. -* **Payments:** Elements from the **Stripe API** are fully integrated to handle secure, PCI-compliant bookings. +- **Frontend:** Built as a Progressive Web Application (PWA) using **React 19** and **Vite** for rapid rendering. **Tailwind CSS** handles the styling, **Leaflet** powers the interactive maps, and **Recharts** handles live analytics. +- **Backend:** Powered by **Node.js** and **Express.js**. I used **Socket.io** to establish persistent, bi-directional WebSocket streams to handle the real-time IoT signal cycles. +- **Payments:** Elements from the **Stripe API** are fully integrated to handle secure, PCI-compliant bookings.  ### Engineering for Offline Resilience -Critical city infrastructure cannot afford downtime. If the internet drops, traffic lights must keep running. + +Critical city infrastructure cannot afford downtime. If the internet drops, traffic lights must keep running. To solve this, I engineered a **hybrid database storage engine**. While the production system runs on **MongoDB Atlas** in the cloud, the database adapter automatically detects connection drops and fails over to a zero-dependency **local JSON database fallback**. This ensures that local servers can keep processing data offline until connectivity is restored. @@ -52,12 +57,13 @@ To solve this, I engineered a **hybrid database storage engine**. While the prod ## The Road Ahead TraffiTech is a foundation. The next steps in our roadmap focus on large-scale logistics: -* **Freight Priority Routing:** Integrating with registered delivery fleets to coordinate "Priority Green" windows, optimizing industrial supply chains. -* **Urban Planning Simulator:** A sandbox mode for city engineers to test new road layouts (like roundabouts) against historical traffic data before investing physical capital. + +- **Freight Priority Routing:** Integrating with registered delivery fleets to coordinate "Priority Green" windows, optimizing industrial supply chains. +- **Urban Planning Simulator:** A sandbox mode for city engineers to test new road layouts (like roundabouts) against historical traffic data before investing physical capital. Smart cities shouldn't just passively observe congestion—they should actively clear it. With AI, IoT, and resilient architectures, platforms like TraffiTech are paving the way for safer, cleaner, and highly coordinated urban transit. -*** +--- -* 👉 [TraffiTech Live Demo](https://trafitech-git-main-10-mohans-projects.vercel.app/) -* 👉 [Explore the Code on GitHub](https://github.com/10-Mohan/Trafitech) +- 👉 [TraffiTech Live Demo](https://trafitech-git-main-10-mohans-projects.vercel.app/) +- 👉 [Explore the Code on GitHub](https://github.com/10-Mohan/Trafitech) diff --git a/PROJECT_DESCRIPTION.md b/PROJECT_DESCRIPTION.md index d679086..568c8b5 100644 --- a/PROJECT_DESCRIPTION.md +++ b/PROJECT_DESCRIPTION.md @@ -1,17 +1,21 @@ # 🏙️ TraffiTech: Smart Traffic & Parking Management System -### *End-to-End Project Description & Technical Documentation* + +### _End-to-End Project Description & Technical Documentation_ --- ## 📌 Executive Summary -**TraffiTech** is a Progressive Web Application (PWA) designed to address two of the most critical challenges facing modern urban areas: **traffic congestion** and **inefficient parking space allocation**. + +**TraffiTech** is a Progressive Web Application (PWA) designed to address two of the most critical challenges facing modern urban areas: **traffic congestion** and **inefficient parking space allocation**. By combining real-time IoT sensor telemetry, interactive map visualizations (React-Leaflet), automated Stripe payment processing, and dynamic demand-based pricing, TraffiTech creates a unified ecosystem for citizens and city administrators. It streamlines the parking space discovery process, dynamically controls traffic light cycles based on vehicle density, and provides critical safety features like real-time emergency routing overrides. --- ## ⚠️ The Problem Statement + As urban populations grow, legacy traffic control and parking infrastructures fail to scale: + 1. **Inefficient Parking Search:** Studies show that drivers searching for parking account for up to **30% of urban traffic congestion**, resulting in wasted fuel, higher carbon emissions, and driver frustration. 2. **Static Traffic Signal Timing:** Conventional traffic lights operate on fixed, pre-programmed timers that do not adjust to actual traffic flow, leading to unnecessary idling and gridlocks during peak hours. 3. **Emergency Vehicle Delays:** First responders (ambulances, fire engines) face critical delays navigating gridlocked intersections, which can directly affect patient survival rates. @@ -20,6 +24,7 @@ As urban populations grow, legacy traffic control and parking infrastructures fa --- ## 💡 The Solution: TraffiTech + TraffiTech bridges these silos by integrating real-time traffic signal automation and reservation-based parking into a single, responsive platform. ```mermaid @@ -41,32 +46,36 @@ graph TD ## 🛠️ Core Features & Detailed Workflows ### 🚦 1. Adaptive Traffic Control Center -* **Emergency Corridor Override (SOS):** Allows dispatcher networks or EMT responders to trigger a global emergency override. The system immediately forces the required vertical or horizontal route into a continuous green light sequence, clearing traffic blocks before the vehicle arrives. -* **AI-Powered Autopilot Mode:** Evaluates live density readings from simulated IoT sensors and dynamically adjusts cycle durations. Lanes with high vehicle density are prioritized, while empty corridors receive shorter green windows, keeping traffic flowing continuously. -* **Live Simulation Map:** An interactive, responsive crossroads schematic mapping active signals, current speeds, and active vehicle counters. + +- **Emergency Corridor Override (SOS):** Allows dispatcher networks or EMT responders to trigger a global emergency override. The system immediately forces the required vertical or horizontal route into a continuous green light sequence, clearing traffic blocks before the vehicle arrives. +- **AI-Powered Autopilot Mode:** Evaluates live density readings from simulated IoT sensors and dynamically adjusts cycle durations. Lanes with high vehicle density are prioritized, while empty corridors receive shorter green windows, keeping traffic flowing continuously. +- **Live Simulation Map:** An interactive, responsive crossroads schematic mapping active signals, current speeds, and active vehicle counters. ### 🅿️ 2. Smart Parking Space Allocation -* **Interactive Geolocation Spotting:** Integrates React-Leaflet maps to automatically capture the user's GPS coordinates and display nearby parking garages. -* **Dynamic Surge Pricing:** Features demand-responsive pricing logic. During peak hours (9:00–11:00 AM & 5:00–7:00 PM), the hourly parking rate scales by **1.5x** automatically to manage parking gridlocks. -* **Seamless Reservation Flow:** Built with Stripe Elements. Users securely enter checkout credentials, receive automated session confirmations, and generate a dynamic, digital **QR Access Ticket** for contactless gate verification. + +- **Interactive Geolocation Spotting:** Integrates React-Leaflet maps to automatically capture the user's GPS coordinates and display nearby parking garages. +- **Dynamic Surge Pricing:** Features demand-responsive pricing logic. During peak hours (9:00–11:00 AM & 5:00–7:00 PM), the hourly parking rate scales by **1.5x** automatically to manage parking gridlocks. +- **Seamless Reservation Flow:** Built with Stripe Elements. Users securely enter checkout credentials, receive automated session confirmations, and generate a dynamic, digital **QR Access Ticket** for contactless gate verification. ### 📊 3. Executive Data Insights -* **System Analytics:** Features custom-styled **Recharts** line charts showing traffic volume trends mapped against hourly parking occupancy over 24 hours. -* **Revenue & Space Management:** Displays cumulative revenue, total transactions, and fills/availabilities per parking zone (Week, Month, Year views). + +- **System Analytics:** Features custom-styled **Recharts** line charts showing traffic volume trends mapped against hourly parking occupancy over 24 hours. +- **Revenue & Space Management:** Displays cumulative revenue, total transactions, and fills/availabilities per parking zone (Week, Month, Year views). --- ## 💻 Tech Stack & Architecture -* **Frontend (Single Page App):** React 19, Vite, Tailwind CSS, Leaflet, Recharts, Lucide Icons, Framer Motion. -* **Backend (REST API & WebSockets):** Node.js, Express, Socket.io (for streaming real-time IoT signal cycles). -* **Database (Hybrid Storage Model):** MongoDB Atlas (Cloud database) backed by a Zero-Dependency local JSON file database fallback for maximum reliability. -* **Payment Gateway:** Stripe API integration. -* **Hosting & Production:** Frontend hosted on **Vercel**, Backend hosted on **Render** (fully hosted in the cloud, running 24/7). +- **Frontend (Single Page App):** React 19, Vite, Tailwind CSS, Leaflet, Recharts, Lucide Icons, Framer Motion. +- **Backend (REST API & WebSockets):** Node.js, Express, Socket.io (for streaming real-time IoT signal cycles). +- **Database (Hybrid Storage Model):** MongoDB Atlas (Cloud database) backed by a Zero-Dependency local JSON file database fallback for maximum reliability. +- **Payment Gateway:** Stripe API integration. +- **Hosting & Production:** Frontend hosted on **Vercel**, Backend hosted on **Render** (fully hosted in the cloud, running 24/7). --- ## 🌟 Why TraffiTech is Different + 1. **Unified Ecosystem:** Instead of using separate apps for traffic navigation and parking booking, TraffiTech joins them together to help drivers park before hitting gridlocks. 2. **Offline Resilience:** The application's database adapter automatically fails over to local files if cloud servers are unreachable, guaranteeing zero downtime. 3. **Progressive Web App (PWA) First:** Fully installable directly onto mobile home screens without requiring native app store downloads. @@ -74,22 +83,24 @@ graph TD --- ## 📈 Future Scope & Large-Scale Optimizations + Based on the physical and digital systems optimization domain, we have designed a roadmap detailing three large-scale features: 1. **🚚 Freight & Logistics Priority Routing (Supply Chain)** - * **Concept:** Integration with registered delivery truck fleets (e.g., Amazon, FedEx). The system recognizes these logistics vehicles on approaching corridors and coordinates the traffic grid to provide "Priority Green" windows. - * **Impact:** Drastically reduces delivery delay overhead, lowers idling fuel waste, and optimizes supply chain flow inside heavy commercial zones. - + - **Concept:** Integration with registered delivery truck fleets (e.g., Amazon, FedEx). The system recognizes these logistics vehicles on approaching corridors and coordinates the traffic grid to provide "Priority Green" windows. + - **Impact:** Drastically reduces delivery delay overhead, lowers idling fuel waste, and optimizes supply chain flow inside heavy commercial zones. + 2. **💡 IoT-Based Smart Streetlighting (Infrastructure Energy Management)** - * **Concept:** Linking physical city streetlighting grids directly to TraffiTech's traffic density sensors. When zero traffic is detected during off-peak night hours, streetlights dim by 50% automatically and ramp back to 100% brightness as vehicles approach. - * **Impact:** Slashes city energy costs and grid loads by up to 40% while keeping roads safely lit. + - **Concept:** Linking physical city streetlighting grids directly to TraffiTech's traffic density sensors. When zero traffic is detected during off-peak night hours, streetlights dim by 50% automatically and ramp back to 100% brightness as vehicles approach. + - **Impact:** Slashes city energy costs and grid loads by up to 40% while keeping roads safely lit. 3. **📐 Urban Planning Simulator (Virtual Layout Builder)** - * **Concept:** A sandbox simulation mode built into the admin control panel. It allows traffic engineers to test route redesigns (e.g., adding roundabouts or modifying parking garages) against historical volume trends. - * **Impact:** Enables predictive urban planning before spending capital resources on physical roadway redesign. + - **Concept:** A sandbox simulation mode built into the admin control panel. It allows traffic engineers to test route redesigns (e.g., adding roundabouts or modifying parking garages) against historical volume trends. + - **Impact:** Enables predictive urban planning before spending capital resources on physical roadway redesign. --- ## 🚀 Live Access Links -* **Live Application URL:** [https://trafitech-git-main-10-mohans-projects.vercel.app/](https://trafitech-git-main-10-mohans-projects.vercel.app/) -* **GitHub Code Repository:** [https://github.com/10-Mohan/Trafitech](https://github.com/10-Mohan/Trafitech) + +- **Live Application URL:** [https://trafitech-git-main-10-mohans-projects.vercel.app/](https://trafitech-git-main-10-mohans-projects.vercel.app/) +- **GitHub Code Repository:** [https://github.com/10-Mohan/Trafitech](https://github.com/10-Mohan/Trafitech) diff --git a/README.md b/README.md index c98917b..1a0cdad 100644 --- a/README.md +++ b/README.md @@ -16,23 +16,27 @@ TraffiTech is an end-to-end, AI-powered Progressive Web Application (PWA) design ## 🎯 Key Features ### 🚥 1. Traffic Control Center -* **Active Corridor Preemption:** One-click emergency corridor override to clear lanes for EMTs/ambulances. -* **Auto-Pilot Mode:** AI-driven cycle recommendations that adjust traffic light durations dynamically based on vehicle density. -* **Live Intersection Map:** Interactive SVG visualization of road intersections with active car flow animations. + +- **Active Corridor Preemption:** One-click emergency corridor override to clear lanes for EMTs/ambulances. +- **Auto-Pilot Mode:** AI-driven cycle recommendations that adjust traffic light durations dynamically based on vehicle density. +- **Live Intersection Map:** Interactive SVG visualization of road intersections with active car flow animations. ### 🚗 2. Smart Parking Allocation -* **Interactive Geolocation Map:** Real-time user localization with automatic discovery of nearby parking zones via Leaflet. -* **Dynamic Surge Pricing:** Automatic price adjustments (1.5x multiplier) during high-demand peak hours. -* **Integrated Booking & Payments:** Secure reservation of selected slots backed by Stripe API test payments. -* **Digital Access Tickets:** Generates dynamic, secure QR codes for automated entry and exit authentication. + +- **Interactive Geolocation Map:** Real-time user localization with automatic discovery of nearby parking zones via Leaflet. +- **Dynamic Surge Pricing:** Automatic price adjustments (1.5x multiplier) during high-demand peak hours. +- **Integrated Booking & Payments:** Secure reservation of selected slots backed by Stripe API test payments. +- **Digital Access Tickets:** Generates dynamic, secure QR codes for automated entry and exit authentication. ### 📊 3. Executive Analytics Dashboards -* **System Analytics:** Interactive Recharts trendlines measuring traffic density vs. parking availability over 24 hours. -* **Parking Analytics:** Real-time occupancy breakdown (Available, Occupied, Reserved) and revenue projections categorized by date ranges (week, month, year). + +- **System Analytics:** Interactive Recharts trendlines measuring traffic density vs. parking availability over 24 hours. +- **Parking Analytics:** Real-time occupancy breakdown (Available, Occupied, Reserved) and revenue projections categorized by date ranges (week, month, year). ### 📱 4. Progressive Web App (PWA) Support -* Fully responsive UI optimized for mobile viewports, landscape tablets, and desktop setups. -* Offline capability and quick launch access via home screen installation. + +- Fully responsive UI optimized for mobile viewports, landscape tablets, and desktop setups. +- Offline capability and quick launch access via home screen installation. --- @@ -53,10 +57,12 @@ graph TD ## 💻 Local Setup & Development ### Prerequisites -* [Node.js](https://nodejs.org/) (v16+) -* npm (v8+) + +- [Node.js](https://nodejs.org/) (v16+) +- npm (v8+) ### 1. Clone & Install Dependencies + ```bash # Clone the repository git clone https://github.com/10-Mohan/Trafitech.git @@ -71,7 +77,9 @@ npm install ``` ### 2. Configure Environment Variables + Create a `.env` file inside the `server/` directory: + ```env PORT=5000 MONGODB_URI=mongodb://localhost:27017/traffitech @@ -82,6 +90,7 @@ STRIPE_SECRET_KEY=your_stripe_sk_test_key ``` ### 3. Run Locally + ```bash # Start the Backend Server (from server/ directory) npm run dev @@ -89,10 +98,13 @@ npm run dev # Start the Frontend Vite Client (from root directory in a new terminal) npm run dev ``` + ### 🔑 Account Registration & Admin Passcode + When creating a new account on the registration page: -* **Driver Account:** Select **"Regular Driver"**, enter your email, username, and password. -* **City Admin Account:** Select **"City Admin"**, enter your details, and provide the **Admin Security Passcode**: + +- **Driver Account:** Select **"Regular Driver"**, enter your email, username, and password. +- **City Admin Account:** Select **"City Admin"**, enter your details, and provide the **Admin Security Passcode**: ```text traffitech-admin-2026 ``` @@ -104,26 +116,31 @@ When creating a new account on the registration page: The project is fully set up for 24/7 cloud availability without requiring your local laptop to run: ### 1. Database (MongoDB Atlas) -* Spin up a free cluster on MongoDB Atlas. -* Set IP Access list to `0.0.0.0/0` (Allow access from anywhere). -* Copy your connection string and insert your user credentials. + +- Spin up a free cluster on MongoDB Atlas. +- Set IP Access list to `0.0.0.0/0` (Allow access from anywhere). +- Copy your connection string and insert your user credentials. ### 2. Backend (Render.com) -* Create a new Web Service pointing to your repository. -* Set the Root Directory to `server`. -* Set Build Command to `npm install` and Start Command to `node index.js`. -* Input your `MONGODB_URI`, `JWT_SECRET`, and Stripe keys as environment variables. + +- Create a new Web Service pointing to your repository. +- Set the Root Directory to `server`. +- Set Build Command to `npm install` and Start Command to `node index.js`. +- Input your `MONGODB_URI`, `JWT_SECRET`, and Stripe keys as environment variables. ### 3. Frontend (Vercel.com) -* Connect your repository to Vercel. -* Set the Build Command to `npm run build` and Output Directory to `dist`. -* Add `VITE_API_URL` pointing to your Render service (`https://your-api.onrender.com/api`). -* Vercel will automatically trigger deployments on every git push to your `main` branch. + +- Connect your repository to Vercel. +- Set the Build Command to `npm run build` and Output Directory to `dist`. +- Add `VITE_API_URL` pointing to your Render service (`https://your-api.onrender.com/api`). +- Vercel will automatically trigger deployments on every git push to your `main` branch. --- ### 🔑 Account Registration & Admin Passcode + When creating a new account on the registration page: -* **Driver Account:** Select **"Regular Driver"**, enter your email, username, and password. -* **City Admin Account:** Select **"City Admin"**, enter your details, and provide the **Admin Security Passcode**: + +- **Driver Account:** Select **"Regular Driver"**, enter your email, username, and password. +- **City Admin Account:** Select **"City Admin"**, enter your details, and provide the **Admin Security Passcode**: `traffitech-admin-pass-2026` diff --git a/README_PRODUCTION.md b/README_PRODUCTION.md index a8b1c95..89b6619 100644 --- a/README_PRODUCTION.md +++ b/README_PRODUCTION.md @@ -5,6 +5,7 @@ Follow these steps to deploy your Smart Traffic & Parking system to the cloud fo --- ### Step 1: Create a Cloud Database (5 mins) + 1. Go to [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) and create a free account. 2. Create a new Cluster (Shared/Free). 3. Under **Network Access**, allow access from "Everywhere" (0.0.0.0/0). @@ -15,6 +16,7 @@ Follow these steps to deploy your Smart Traffic & Parking system to the cloud fo --- ### Step 2: Prepare for Upload + 1. Open the project folder on your computer. 2. **DELETE** the `node_modules` folders (both in root and inside `server`). These are very large and reconstructed in the cloud. 3. **DELETE** the `.env` files (keep them safe on your PC, you will copy the values into the cloud dashboard later). @@ -23,6 +25,7 @@ Follow these steps to deploy your Smart Traffic & Parking system to the cloud fo --- ### Step 3: Deploy Backend (Render.com) + 1. Go to [Render](https://render.com) and sign up (GitHub login recommended). 2. Click **New** > **Web Service**. 3. You can either connect a GitHub repo or use "Manual Deploy" by uploading your ZIP. @@ -36,6 +39,7 @@ Follow these steps to deploy your Smart Traffic & Parking system to the cloud fo --- ### Step 4: Deploy Frontend (Vercel.com) + 1. Go to [Vercel](https://vercel.com) and sign up. 2. Click **Add New** > **Project**. 3. Upload your project folder or connect GitHub. @@ -47,4 +51,5 @@ Follow these steps to deploy your Smart Traffic & Parking system to the cloud fo --- ### ✅ Your Permanent Link + Once Step 4 is done, Vercel will give you a permanent link (e.g. `traffitech.vercel.app`) that works **24/7**! diff --git a/eslint.config.js b/eslint.config.js index d291aa3..e86d696 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -27,7 +27,10 @@ export default defineConfig([ }, }, rules: { - 'no-unused-vars': ['warn', { varsIgnorePattern: '^[A-Z_]', argsIgnorePattern: '^_' }], + 'no-unused-vars': [ + 'warn', + { varsIgnorePattern: '^[A-Z_]|motion', argsIgnorePattern: '^[A-Z_]', caughtErrors: 'none' }, + ], 'no-debugger': 'error', 'no-duplicate-imports': 'error', 'no-console': 'off', @@ -60,7 +63,10 @@ export default defineConfig([ }, }, rules: { - 'no-unused-vars': ['warn', { varsIgnorePattern: '^[A-Z_]', argsIgnorePattern: '^_' }], + 'no-unused-vars': [ + 'warn', + { varsIgnorePattern: '^[A-Z_]', argsIgnorePattern: '^[A-Z_]', caughtErrors: 'none' }, + ], 'no-debugger': 'error', // Allow console in server/backend code (needed for server logs) 'no-console': 'off', @@ -93,4 +99,3 @@ export default defineConfig([ }, }, ]); - diff --git a/index.html b/index.html index 02680fb..1c2068a 100644 --- a/index.html +++ b/index.html @@ -1,27 +1,32 @@ +
+ + + + + - - - - - - + +