This project is a web application designed to track camera deployments, providing insights into current and historical camera locations.
- View Current Camera Locations: See all active camera deployments on an interactive map.
- Historical Location Mapping: Explore past camera deployment locations on the map.
- Date Range Filtering: Filter camera deployments by specific date ranges to analyze historical patterns.
- Deployment Statistics: View key statistics such as total deployments, unique locations, average deployment duration, and the most frequent deployment locations.
- Email Subscriptions: Users can subscribe to receive email notifications (Note: backend functionality for sending emails would need to be fully implemented if not already present).
- Frontend: React, Vite, TypeScript, Tailwind CSS, Leaflet (for maps), Shadcn/ui (for UI components)
- Backend: Node.js, Express.js, TypeScript
- Database: PostgreSQL (inferred from
drizzle-kitandconnect-pg-simple) - Other Key Libraries: React Query (for data fetching), Zod (for validation), Cheerio (likely for scraping camera data)
client/: Contains the React frontend application.server/: Contains the Express.js backend server.shared/: Contains shared code/types between the client and server (e.g., database schema).
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install dependencies: Make sure you have Node.js and npm (or yarn) installed.
npm install # or # yarn install
-
Database Setup: This project uses PostgreSQL. Ensure you have a PostgreSQL instance running and configure the connection details (likely in a
.envfile or environment variables, though the specific configuration method isn't detailed inpackage.json). Push the database schema:npm run db:push
-
Running in Development Mode: This command starts the development server for both the client and server with hot reloading.
npm run dev
The application should typically be accessible at
http://localhost:5173(Vite's default) or as specified in the console output. -
Building for Production: This command builds the frontend and backend for production.
npm run build
-
Starting in Production Mode: This command starts the application using the production build.
npm run start
npm run dev: Starts the development server.npm run build: Builds the application for production.npm run start: Starts the production server.npm run check: Runs TypeScript checks.npm run db:push: Pushes schema changes to the database using Drizzle Kit.