AR NAVIGATION FOR INDOOR SPACES is an augmented reality (AR) indoor navigation system that allows users to create, manage, and use AR-based navigation paths. The system uses image recognition to identify locations and provides step-by-step navigation between points of interest. It's designed to work both online and offline, making it suitable for environments with limited connectivity.
The application consists of two main components:
- Admin Interface: For creating and managing AR targets and connections
- User Interface: For scanning targets and navigating between locations
- Node.js 16.x or higher
- MongoDB database (local or cloud-based)
- npm or yarn
-
Clone the repository:
git clone https://github.com/yourusername/mindar-navigator.git cd mindar-navigator
-
Install dependencies:
npm install # or yarn install
-
Create a
.env.local
file in the root directory with the following variables:MONGODB_URI=mongodb+srv://username:password@cluster0.mongodb.net/mindar-navigator?retryWrites=true&w=majority ADMIN_PASSWORD=your-secure-admin-password ADMIN_API_KEY=your-secure-api-key NEXT_PUBLIC_ADMIN_API_KEY=your-secure-api-key
-
Run the development server:
npm run dev # or yarn dev
-
Open http://localhost:3000 in your browser to see the application.
-
Login: Access the admin interface at
/admin/login
using theADMIN_PASSWORD
set in your environment variables. -
Creating Mind Files:
- Navigate to the admin dashboard
- Click "Create New Mind File"
- Upload target images (high-contrast images work best)
- Add details for each target (name, description, location)
- Define connections between targets with distances and directions
- Generate the mind file
-
Testing Target Images:
- Navigate to "Test Images" in the admin panel
- Upload target images to test their recognition quality
- Test with your mobile device to ensure reliable detection
-
Managing Mind Files:
- View all created mind files
- Download, edit, or delete mind files
- Generate and manage PIN codes for sharing
-
Accessing Navigation:
- Open the application on a mobile device
- Enter a PIN code to load a specific mind file
- Or use the cached mind files if previously loaded
-
Navigating:
- Point your camera at a recognized target
- View information about the current location
- Select a destination from the available connections
- Follow the step-by-step navigation instructions
-
Offline Usage:
- The application works offline once mind files are cached
- Navigation data is stored locally for offline access
- AR Image Recognition: Uses MindAR for reliable image target recognition
- Indoor Navigation: Provides step-by-step guidance between locations
- Multiple Navigation Paths: Calculates and offers alternative routes
- Offline Support: Works without internet connection after initial setup
- PWA Support: Can be installed as a Progressive Web App
- Responsive Design: Works on mobile and desktop devices
- Mind File Creation: Create and manage AR target files
- Target Management: Add, edit, and remove navigation targets
- Connection Management: Define paths between targets with distance and direction
- PIN Generation: Create shareable PINs for easy mind file access
- Target Testing: Test target images before deployment
- MongoDB Integration: Store and retrieve mind files from MongoDB
- Local-only Mode: Option to skip MongoDB upload for testing
- AR Scanner: Scan and recognize targets in real-time
- Location Information: View details about the current location
- Navigation Options: Choose from available destinations
- Path Visualization: See connections between locations
- Step-by-Step Guidance: Follow navigation instructions
- Offline Access: Use cached mind files without internet
- Path Explorer: Explore available paths without AR scanning
Variable | Description | Required |
---|---|---|
MONGODB_URI |
MongoDB connection string | Yes |
ADMIN_PASSWORD |
Password for admin login | Yes |
ADMIN_API_KEY |
API key for admin operations | Yes |
NEXT_PUBLIC_ADMIN_API_KEY |
Client-side API key | Yes |
-
Create a MongoDB database named
mindar-navigator
. -
The application will automatically create the following collections:
mindfiles
: Stores mind file data and metadatausers
: Stores admin user information (if applicable)
The application is configured as a Progressive Web App. You can customize the PWA settings in:
public/manifest.json
: App name, icons, and theme colorsapp/sw.tsx
: Service worker configurationpublic/sw.js
: Service worker implementation
GET /api/mindfiles
Headers: Authorization: Bearer {ADMIN_API_KEY}
Response: Array of mind file objects (without base64 data)
GET /api/mindfiles?id={id}
Headers: Authorization: Bearer {ADMIN_API_KEY}
Response: Complete mind file object
POST /api/mindfiles
Headers: Authorization: Bearer {ADMIN_API_KEY}
Body: FormData with 'mindFile' (file) and 'metadata' (JSON string)
Response: { success: true, id: string, pin: string }
PUT /api/mindfiles/update
Headers: Authorization: Bearer {ADMIN_API_KEY}
Body: { id: string, updates: object }
Response: { success: true }
DELETE /api/mindfiles/{id}
Headers: Authorization: Bearer {ADMIN_API_KEY}
Response: { success: true, message: string }
GET /api/mindfiles/download?id={id}
Headers: Authorization: Bearer {ADMIN_API_KEY}
Response: ZIP file containing mind file and metadata
GET /api/mindfiles/pin/{pin}
Response: Mind file blob
POST /api/auth/login
Body: { password: string }
Response: { success: true, token: string }
We welcome contributions to the MindAR Navigator project! Here's how you can contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Run tests to ensure everything works
- Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow the existing code style
- Use TypeScript for type safety
- Write meaningful commit messages
- Document new features or changes
- Test your changes thoroughly
- Ensure AR functionality works on multiple devices
- Test offline functionality
- Verify MongoDB integration if applicable
This project is licensed under the MIT License - see the LICENSE file for details.