Skip to content

AR Navigation for Indoor Spaces — A powerful AR-based indoor navigation system using MindAR. Includes admin tools for creating target paths and a mobile-friendly interface for real-time, offline AR guidance.

Notifications You must be signed in to change notification settings

dishapatel010/ARNAV

Repository files navigation

AR NAVIGATION FOR INDOOR SPACES

Project Description

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

Screenshots

Project Banner

Admin Dashboard & Mind File Management

Admin dashboard showing mind files

AR Navigation Experience

Admin dashboard showing mind files

Path Explorer & Connection Analysis

Path Explorer & Connection Analysis

Installation

Prerequisites

  • Node.js 16.x or higher
  • MongoDB database (local or cloud-based)
  • npm or yarn

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/yourusername/mindar-navigator.git
    cd mindar-navigator
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. 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
    
  4. Run the development server:

    npm run dev
    # or
    yarn dev
  5. Open http://localhost:3000 in your browser to see the application.

Usage

Admin Interface

  1. Login: Access the admin interface at /admin/login using the ADMIN_PASSWORD set in your environment variables.

  2. 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
  3. 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
  4. Managing Mind Files:

    • View all created mind files
    • Download, edit, or delete mind files
    • Generate and manage PIN codes for sharing

User Interface

  1. 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
  2. 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
  3. Offline Usage:

    • The application works offline once mind files are cached
    • Navigation data is stored locally for offline access

Features

Core Features

  • 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

Admin Features

  • 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

User Features

  • 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

Configuration

Environment Variables

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

MongoDB Setup

  1. Create a MongoDB database named mindar-navigator.

  2. The application will automatically create the following collections:

    • mindfiles: Stores mind file data and metadata
    • users: Stores admin user information (if applicable)

PWA Configuration

The application is configured as a Progressive Web App. You can customize the PWA settings in:

  • public/manifest.json: App name, icons, and theme colors
  • app/sw.tsx: Service worker configuration
  • public/sw.js: Service worker implementation

API Reference

Mind Files API

Get All Mind Files

GET /api/mindfiles
Headers: Authorization: Bearer {ADMIN_API_KEY}
Response: Array of mind file objects (without base64 data)

Get Mind File by ID

GET /api/mindfiles?id={id}
Headers: Authorization: Bearer {ADMIN_API_KEY}
Response: Complete mind file object

Create Mind File

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 }

Update Mind File

PUT /api/mindfiles/update
Headers: Authorization: Bearer {ADMIN_API_KEY}
Body: { id: string, updates: object }
Response: { success: true }

Delete Mind File

DELETE /api/mindfiles/{id}
Headers: Authorization: Bearer {ADMIN_API_KEY}
Response: { success: true, message: string }

Download Mind File

GET /api/mindfiles/download?id={id}
Headers: Authorization: Bearer {ADMIN_API_KEY}
Response: ZIP file containing mind file and metadata

Get Mind File by PIN

GET /api/mindfiles/pin/{pin}
Response: Mind file blob

Authentication API

Admin Login

POST /api/auth/login
Body: { password: string }
Response: { success: true, token: string }

Contributing

We welcome contributions to the MindAR Navigator project! Here's how you can contribute:

Development Process

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests to ensure everything works
  5. Commit your changes (git commit -m 'Add some amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Code Style

  • Follow the existing code style
  • Use TypeScript for type safety
  • Write meaningful commit messages
  • Document new features or changes

Testing

  • Test your changes thoroughly
  • Ensure AR functionality works on multiple devices
  • Test offline functionality
  • Verify MongoDB integration if applicable

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

AR Navigation for Indoor Spaces — A powerful AR-based indoor navigation system using MindAR. Includes admin tools for creating target paths and a mobile-friendly interface for real-time, offline AR guidance.

Topics

Resources

Stars

Watchers

Forks