StellarVault is a secure, smart, and scalable platform designed to revolutionize how we store, organize, and manage valuable digital and physical items — whether it's in space cargo missions, shared community resources, or personal smart storage systems.
Built with a combination of IoT, Machine Learning, and a responsive web interface, StellarVault enables intelligent tracking, optimized placement, and efficient retrieval of assets with real-time insights.
- 🔐 Secure Vault System: Smart monitoring with role-based access.
- 📦 Optimized Item Placement: AI-powered recommendations for space-efficient storage.
- 🌐 Web Dashboard: Real-time tracking, analytics, and user control.
- 🔁 Retrieval & Rearrangement Logic: Prioritizes frequently used items for quicker access.
- 🛰️ Space Cargo Mode: Tailored for aerospace applications (astronaut stowage advisor).
- 🌱 Eco Monitoring: Tracks waste and resource reuse efficiency.
The backend of StellarVault is built using:
- Next.js API Routes: Server-side API endpoints
- MongoDB: NoSQL database for data storage
- Mongoose: ODM (Object Document Mapper) for MongoDB
- NextAuth.js: Authentication system
- JWT: Token-based authentication
- Zod: Schema validation
name: User's full nameemail: User's email address (unique)password: Hashed passwordrole: User role (admin, astronaut, ground-control)
itemId: Unique identifier for the itemname: Item namewidth,depth,height: Item dimensionsmass: Item mass in kgpriority: Item priority (0-100)expiryDate: Date when the item expires (if applicable)usageLimit: Maximum number of usesusesLeft: Remaining usespreferredZone: Preferred storage zonecontainerId: ID of the container where the item is storedposition: 3D position within the containerisWaste: Whether the item is wastewasteReason: Reason for being waste (Expired, Out of Uses, Damaged)createdBy: User who created the item
containerId: Unique identifier for the containerzone: Storage zonewidth,depth,height: Container dimensionsmaxWeight: Maximum weight capacitycurrentWeight: Current weight of itemsitemCount: Number of items in the containerutilization: Space utilization percentage
userId: User who performed the actionuserName: Name of the useraction: Type of action (add, remove, update, retrieve, move, waste)itemId: ID of the item involveditemName: Name of the itemcontainerId: ID of the container involveddetails: Additional details about the activitytimestamp: When the activity occurred
POST /api/auth/register: Register a new userPOST /api/auth/login: Login and get JWT token
GET /api/items: Get all items (with optional filters)POST /api/items: Create a new itemGET /api/items/:id: Get item by IDPUT /api/items/:id: Update itemDELETE /api/items/:id: Delete item
GET /api/containers: Get all containers (with optional filters)POST /api/containers: Create a new containerGET /api/containers/:id: Get container by ID (includes items)PUT /api/containers/:id: Update containerDELETE /api/containers/:id: Delete container
GET /api/activities: Get activity log (with pagination and filters)
POST /api/waste/identify: Identify waste items
POST /api/simulate/day: Simulate passage of time
The system uses a dual authentication approach:
- JWT Tokens: For API authentication
- NextAuth.js: For web interface authentication
Security features include:
- Password hashing with bcrypt
- JWT token validation
- Role-based access control
- Input validation with Zod
- Secure MongoDB connection
- Clone the repository
- Install dependencies:
npm install - Set up environment variables in
.env.local - Start MongoDB locally or use a cloud provider
- Run the development server:
npm run dev
Create a .env.local file with the following variables:
``` MONGODB_URI=mongodb://localhost:27017/space-station JWT_SECRET=your-secret-key-change-this-in-production NEXTAUTH_SECRET=your-nextauth-secret-change-this-in-production NEXTAUTH_URL=http://localhost:3000 ```
For production deployment:
- Update environment variables with production values
- Build the application:
npm run build - Start the production server:
npm start