An interactive map visualizing the US Department of Defense 1033 Program, which tracks the transfer of excess military equipment to law enforcement agencies across the United States.
The 1033 Program was created by the National Defense Authorization Act of Fiscal Year 1997 as part of the US Government's Defense Logistics Agency Disposition Services (DLA) to transfer excess military equipment to law enforcement agencies. As of 2014, 8,000 local law enforcement agencies participated in the reutilization program that has transferred $5.1 billion in military hardware from the Department of Defense to local American law enforcement agencies since 1997.
- Interactive map showing military equipment distribution across US counties
- Real-time data updates using Socket.io
- Color-coded visualization by cost per household
- Detailed equipment breakdown by clicking on any county
- User authentication (optional)
- Responsive design for mobile and desktop
- Backend: Node.js 20+, Express.js 4
- Database: MongoDB 6+ with Mongoose ODM
- Real-time: Socket.io 4
- Template Engine: Pug
- Maps: Leaflet.js with D3.js overlay
- Data: TopoJSON for county boundaries
- Security: Helmet, rate limiting, CSRF protection
# Clone the repository
git clone https://github.com/michaelcolenso/1033-Program-Map.git
cd 1033-Program-Map
# Start with Docker Compose (database is seeded automatically)
docker-compose up -dThe application will be available at http://localhost:8080
To force a reseed of the database:
docker-compose run --rm seed-force- Node.js 20+
- npm 10+
- MongoDB 6+
-
Clone and install
git clone https://github.com/michaelcolenso/1033-Program-Map.git cd 1033-Program-Map npm install -
Configure environment
cp .env.example .env # Edit .env with your settings -
Start MongoDB
# macOS brew services start mongodb-community # Ubuntu/Debian sudo systemctl start mongod
-
Seed the database
npm run seed
-
Start the server
# Development (with auto-reload) npm run dev # Production npm start
| Variable | Description | Default |
|---|---|---|
NODE_ENV |
Environment mode | development |
PORT |
Server port | 8080 |
MONGODB_URI |
MongoDB connection string | mongodb://localhost:27017/1033-program-map |
SESSION_SECRET |
Session encryption secret | (required) |
EMAIL_HOST |
SMTP host for password reset | (optional) |
EMAIL_USER |
SMTP username | (optional) |
EMAIL_PASSWORD |
SMTP password | (optional) |
1033-Program-Map/
├── app.js # Express application
├── routes/
│ └── index.js # Route definitions
├── controllers/
│ ├── home.js # Home page
│ ├── map.js # Map page
│ ├── user.js # Authentication
│ └── contact.js # Contact form
├── models/
│ └── User.js # User model
├── config/
│ ├── secrets.js # Environment config
│ └── passport.js # Auth strategies
├── views/ # Pug templates
├── public/
│ ├── js/
│ │ ├── main.js # Map logic
│ │ └── *.json # GeoJSON data
│ └── css/
├── scripts/
│ └── seed.js # Database seeder
├── Dockerfile
└── docker-compose.yml
npm start # Start production server
npm run dev # Start development server with auto-reload
npm test # Run test suite
npm run seed # Seed database with equipment data
npm run seed:skip # Seed only if collection is empty
npm run seed:force # Drop and reseed collection
npm run lint # Run ESLint| Endpoint | Description |
|---|---|
GET / |
Home page |
GET /map |
Interactive map |
GET /api/health |
Health check |
GET /login |
Login page |
GET /signup |
Registration page |
| Event | Direction | Description |
|---|---|---|
getid |
Client → Server | Request equipment data for a county |
id |
Server → Client | Equipment data response |
docker build -t 1033-program-map .
docker run -p 8080:8080 -e MONGODB_URI=your-mongo-uri 1033-program-map- Create a free MongoDB Atlas cluster (
M0) and database user. - In Atlas
Network Access, allow0.0.0.0/0(or tighter CIDR if available). - Copy your Atlas connection string and replace
<password>. - Push this repository to GitHub (includes
render.yamlBlueprint config). - In Render, click
New->Blueprintand select this repo. - Set
MONGODB_URIin Render to your Atlas connection string. - Deploy.
Render will run npm run seed:skip during deploy, so the first deploy seeds data and later deploys skip if data already exists.
To force reseed later from Render Shell:
npm run seed:force- CSRF protection enabled
- Rate limiting on API routes
- Helmet.js security headers
- Secure session cookies in production
- Password hashing with bcrypt
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Equipment data from The New York Times.
MIT
For issues and questions, please open an issue on GitHub.