Skip to content

webdevtodayjason/warmnapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WARMAPPER-T3 πŸŒπŸ“‘

License Version T3 Stack Next.js Prisma

WARMAPPER is a modern WiFi network discovery and mapping tool built with the T3 Stack (TypeScript, Tailwind CSS, and tRPC). It helps security researchers and network administrators visualize and analyze WiFi networks from Wigle WiFi-compatible scans.

WARMAPPER Preview

✨ Features

  • πŸ—ΊοΈ Interactive Maps: Visualize WiFi networks on Google Maps
  • πŸ“Š Dashboard Analytics: Comprehensive WiFi network statistics
  • πŸ” Security Analysis: Categorize networks by security level
  • πŸ“‘ Signal Insights: Analyze signal strength and coverage
  • πŸ“‚ Data Sharing: Share WiFi data with the community
  • πŸ”„ Real-time Parsing: Parse and process WiFi scan data instantly
  • 🌐 Community Database: Access shared WiFi data from other users

πŸš€ Live Demo

Check out the live demo at warmapper-t3.vercel.app

πŸ“‹ Table of Contents

πŸ” Prerequisites

Before you begin, ensure you have the following installed:

πŸ”§ Installation

# Clone the repository
git clone https://github.com/webdevtodayjason/warmnapper.git
cd warmnapper

# Install dependencies
npm install

πŸ—„οΈ Database Setup

WARMAPPER uses PostgreSQL for data storage. You can set up the database either manually or using our automated bootstrap script.

Option 1: Automated Setup (Recommended)

Our automated database bootstrap script will:

  • Check if PostgreSQL is running
  • Verify your DATABASE_URL environment variable
  • Create the database if it doesn't exist
  • Generate the Prisma client
  • Push the schema to your database
# Run the database bootstrap script
npm run db:bootstrap

Option 2: Manual Setup

  1. Create a PostgreSQL database:
# Connect to PostgreSQL
psql -U postgres

# Create the database
CREATE DATABASE warmapper;

# Grant permissions (replace 'your_username' with your PostgreSQL username)
GRANT ALL PRIVILEGES ON DATABASE warmapper TO your_username;

# Exit psql
\q
  1. Generate the Prisma client and sync the schema:
# Generate Prisma client
npm run prisma:generate

# Push schema changes to the database
npm run db:push

πŸ” Environment Setup

Create a .env.local file in the root directory with the following:

# Required: Google Maps API Key
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_api_key

# Required: PostgreSQL Database URL
DATABASE_URL="postgresql://postgres:password@localhost:5432/warmapper?schema=public"

# Optional: For production, set NODE_ENV to "production"
NODE_ENV="development"

# Skip environment validation during development
SKIP_ENV_VALIDATION=true

Note: The DATABASE_URL must be defined in .env.local for proper operation.

πŸ“š Usage

  1. Start the application:

    npm run dev
  2. Open your browser: Navigate to http://localhost:3000

  3. Upload WiFi Data:

    • Use the upload button or drag and drop a WiFi scan file
    • Sample data is available in public/data/ directory
    • Choose whether to share the data with the community
    • If sharing, provide your city and state information
  4. Explore the Map:

    • View WiFi networks plotted on the map
    • Toggle between security and signal strength views
    • Click on markers to see detailed information
  5. Analyze Statistics:

    • Check the dashboard for comprehensive statistics
    • View distribution charts for security levels, channels, etc.
  6. Share Data:

    • Your uploaded WiFi data can be stored in the PostgreSQL database
    • You can choose to share it publicly with the community

πŸ“ Project Structure

WARMAPPER-T3/
β”œβ”€β”€ prisma/                 # Database schema and migrations
β”œβ”€β”€ public/                 # Static assets and sample data
β”‚   β”œβ”€β”€ data/               # Sample WiFi data files
β”œβ”€β”€ scripts/                # Utility scripts
β”‚   β”œβ”€β”€ bootstrap-db.js     # Database bootstrap script
β”‚   β”œβ”€β”€ init-db.js          # Database initialization script
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                # Next.js App Router pages
β”‚   β”‚   β”œβ”€β”€ api/            # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ access-points/ # WiFi data API endpoint
β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”‚   β”œβ”€β”€ charts/         # Dashboard chart components
β”‚   β”‚   β”œβ”€β”€ dashboard/      # Dashboard UI components
β”‚   β”‚   β”œβ”€β”€ map/            # Map visualization components
β”‚   β”‚   β”œβ”€β”€ providers/      # Context providers
β”‚   β”‚   └── ui/             # UI components (shadcn/ui)
β”‚   β”œβ”€β”€ contexts/           # React context providers
β”‚   β”‚   β”œβ”€β”€ wifi-context.tsx # WiFi data context
β”‚   β”‚   β”œβ”€β”€ enhanced-wifi-context.tsx # Enhanced WiFi context
β”‚   β”œβ”€β”€ generated/          # Generated code
β”‚   β”‚   β”œβ”€β”€ prisma/         # Generated Prisma client
β”‚   β”œβ”€β”€ lib/                # Utility functions
β”‚   β”‚   β”œβ”€β”€ utils.ts        # General utilities
β”‚   β”‚   └── wifi-utils.ts   # WiFi data processing utilities
β”‚   β”œβ”€β”€ server/             # Server-side code
β”‚   β”‚   β”œβ”€β”€ db.ts           # Prisma client initialization
β”‚   β”œβ”€β”€ services/           # Data services
β”‚   β”‚   β”œβ”€β”€ wifi-data-service.ts # WiFi data service
β”‚   β”œβ”€β”€ styles/             # Global styles
β”‚   └── types/              # TypeScript type definitions
β”œβ”€β”€ .env.example            # Example environment variables
β”œβ”€β”€ .env.local              # Local environment variables (not in git)
β”œβ”€β”€ DATABASE-SETUP.md       # Detailed database setup guide
β”œβ”€β”€ next.config.js          # Next.js configuration
β”œβ”€β”€ package.json            # Project dependencies
β”œβ”€β”€ tailwind.config.js      # Tailwind CSS configuration
└── tsconfig.json           # TypeScript configuration

πŸ› οΈ Technologies

πŸ”§ Troubleshooting

Database Connection Issues

If you encounter database connection issues:

  1. Check if PostgreSQL is running:

    ps aux | grep postgres
  2. Verify your DATABASE_URL in .env.local:

    • The URL should be in the format: postgresql://username:password@localhost:5432/dbname
    • Make sure the DATABASE_URL is defined in .env.local (not just .env)
  3. Run the database bootstrap script:

    npm run db:bootstrap
  4. Check Prisma client generation:

    npm run prisma:generate
  5. Try direct connection to the database:

    psql -U postgres -h localhost -d warmapper

For detailed troubleshooting guidance, refer to the DATABASE-SETUP.md file.

Common Issues

  • "Prisma client was not initialized": Usually means the DATABASE_URL is missing in .env.local or PostgreSQL isn't running
  • "Cannot find module '@/generated/prisma'": Run npm run prisma:generate to generate the Prisma client
  • Mapping issues: Ensure your Google Maps API key is properly set in .env.local

πŸ‘¨β€πŸ’» Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Set up the database using instructions above
  4. Commit your changes (git commit -m 'Add some amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

πŸ“„ License

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

πŸ“¬ Contact

Project Link: github.com/webdevtodayjason/warmnapper


Made with ❀️ by Jason Brashear

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors