A comprehensive event management and emergency response platform designed for large-scale venues. Pinpoint combines a React Native mobile app with a Node.js backend to provide real-time crowd management, medical staff coordination, and incident reporting capabilities.
- Real-time Event Management: Create and manage events at multiple venues
- Crowd Analytics: Monitor crowd density and movement patterns
- Medical Staff Coordination: Dispatch and track medical personnel
- Incident Reporting: Report and track alerts in real-time
- POI Management: Define and monitor points of interest
- User Authentication: Secure role-based access control
- WebSocket Support: Real-time updates via WebSocket connections
Client:
- React Native with Expo
- Expo Router for navigation
- React Native Maps for location services
- TypeScript for type safety
Server:
- Express.js
- MongoDB with Mongoose
- WebSocket (ws) for real-time updates
- JWT for authentication
- bcryptjs for password hashing
Pinpoint/
├── client/ # React Native/Expo mobile application
│ ├── app/ # Application screens and layout
│ ├── components/ # Reusable React components
│ ├── hooks/ # Custom React hooks
│ ├── utils/ # Utility functions
│ └── assets/ # Images, fonts, and static assets
│
├── server/ # Node.js/Express backend
│ ├── config/ # Configuration (MongoDB, etc.)
│ ├── controllers/ # Route controllers
│ ├── models/ # MongoDB schemas
│ ├── routes/ # API endpoints
│ ├── middleware/ # Express middleware
│ └── scripts/ # Utility scripts
│
└── docker-compose.yml # Multi-container setup
- Node.js 16+
- Docker & Docker Compose (optional)
- MongoDB (local or connection string)
- Expo CLI:
npm install -g expo-cli
-
Clone the repository
git clone https://github.com/Texas-Convergent-Emergency-Team/Pinpoint.git cd Pinpoint -
Install server dependencies
cd server npm install cd ..
-
Install client dependencies
cd client npm install cd ..
-
Create environment variables
Create a
.envfile in theserver/directory:MONGODB_URI=mongodb://localhost:27017/pinpoint PORT=5000 NODE_ENV=development JWT_SECRET=your_jwt_secret_here SEED_USERS_ON_STARTUP=true
-
Build and start all services
docker-compose up --build
This starts:
- Client: Expo dev server on ports 19000, 19001, 19002, 19006, 8081
- Server: Express API on port 5000
- MongoDB: Database service
-
Access the application
- Mobile app: Use Expo Go or emulator to connect
- Server API:
http://localhost:5000
Option 1: Local Development
Terminal 1 - Start server:
cd server
npm run devTerminal 2 - Start client:
cd client
npm startOption 2: Docker
docker-compose up| Endpoint | Purpose |
|---|---|
/api/users |
User management and authentication |
/api/events |
Event creation and management |
/api/venues |
Venue information and configuration |
/api/medical-staff |
Medical personnel management |
/api/alerts |
Incident and alert reporting |
/api/pois |
Points of interest management |
/api/venue-planners |
Venue planner coordination |
Seed default data:
cd server
npm run seed-allCheck seed status:
npm run check-seedClear seeded users:
./clear-users.shnpm start- Start Expo development servernpm run ios- Run on iOS simulatornpm run android- Run on Android emulatornpm run web- Run in web browsernpm run lint- Run ESLint
npm start- Start production servernpm run dev- Start with hot reload (nodemon)npm run seed-all- Seed all events and datanpm run check-seed- Check database seed status
Server (.env)
MONGODB_URI # MongoDB connection string
PORT # Server port (default: 5000)
NODE_ENV # development/production
JWT_SECRET # Secret for JWT signing
SEED_USERS_ON_STARTUP # Auto-seed on startup (true/false)
FORCE_AUTO_SEED # Force seeding even in production
The application uses a client-server architecture:
- Client: React Native app deployed via Expo
- Server: Express.js REST API with WebSocket support
- Database: MongoDB for persistent data storage
- Real-time: WebSocket connections for live updates
Authentication flows through JWT tokens stored securely on the client.
- Create a controller in
server/controllers/ - Define a model in
server/models/(if needed) - Create a route file in
server/routes/ - Import the route in
server/server.js
- Create a component in
client/app/orclient/app/(tabs)/ - Export it and configure in navigation layout
- Use Expo Router for routing
Port conflicts?
# Kill process on port (e.g., 5000)
lsof -ti :5000 | xargs kill -9Docker not finding host?
- Ensure Docker Desktop is running
- Use
host.docker.internalfor references to localhost
WebSocket connection issues?
- Check server is running with WebSocket support
- Verify client is using correct server URL
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature/your-feature - Submit a pull request
This project is part of the Texas Convergent Emergency Team initiative.