First Contact is a sovereign, offline-first mesh communication protocol built for environments where traditional internet infrastructure is unavailable, untrustworthy, or actively compromised. Whether in disaster zones, remote deployments, or high-security facilities, First Contact allows teams to coordinate securely and efficiently without relying on centralized servers or cloud infrastructure.
First Contact creates a local mesh network. Devices connect directly to each other over local Wi-Fi or LAN. The network handles discovery, database synchronization, and peer connectivity automatically.
There are three ways to connect to the mesh:
- Mobile Deployment (QR Code): For mobile devices. Scan the tactical barcode on a host node to instantly access the web client and connect directly to the server.
- Terminal Deployment (URL): For laptops and tablets without a camera. Enter the secure mDNS frequency (e.g., http://hostname.local:5173) into a web browser to connect to a host node's server.
- Server Node (Mesh): For true decentralization, run the full backend stack on another computer on the same network. The Bonjour service will automatically discover peers and set up a continuous, bidirectional CouchDB replication mesh on port 5984.
You will need to configure environment variables for both the frontend and backend.
Frontend (.env):
VITE_COUCHDB_USER=admin
VITE_COUCHDB_PASSWORD=password
VITE_COUCHDB_PORT=5984
Backend (.env):
COUCHDB_URL=http://admin:password@localhost:5984
PORT=5000
Ensure Docker is installed and running on your machine. Start the CouchDB container:
docker-compose up -dNavigate to the backend directory, install dependencies, and start the development server:
cd backend
npm install
npm run devOpen a new terminal, navigate to the frontend directory, install dependencies, and start the development server:
cd frontend
npm install
npm run devThe client will be available at http://localhost:5173.
First_Contact/
├── backend/
│ ├── config/ # Database and Mesh Service configurations
│ ├── routes/ # API endpoints
│ ├── sockets/ # Real-time WebSocket handlers
│ ├── server.js # Main Express server
│ ├── package.json # Node.js dependencies
│ └── .env # Backend environment variables
├── frontend/
│ ├── src/ # React application source code
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Application views (Setup, Chat)
│ │ ├── services/ # Socket and user state services
│ │ └── App.tsx # Main application entry point
│ ├── public/ # Static assets (fonts, icons)
│ ├── package.json # Frontend dependencies
│ └── .env # Frontend environment variables
├── images/ # Example screenshots
├── docs/ # Architecture documentation
├── docker-compose.yml # CouchDB deployment configuration
├── local.ini # CouchDB configuration overrides
└── README.md # Project documentation
Built by team TetraFourge


