SmartStock AI is a revolutionary inventory management application that leverages artificial intelligence to transform traditional stock management. Built with Next.js 15 and TypeScript, this comprehensive solution automates inventory processes through intelligent data extraction and modern web technologies.
π Visit SmartStock AI
Alternative deployment: https://smartstock-95glfz1u4-antriksh-sharmas-projects.vercel.app
Experience the power of AI-driven inventory management in action!
- Multi-Format Support: CSV, Excel, PDF, and image files
- Google Cloud Vision AI: Intelligent text extraction from images
- Google Vertex AI: Advanced data processing and recognition
- Smart Column Mapping: Automatic detection of product data fields
- Dark Theme: Professional, modern design
- Responsive Design: Works seamlessly on desktop and mobile
- Drag & Drop: Intuitive file upload experience
- Camera Integration: Direct photo capture for inventory sheets
- Real-time Charts: Interactive data visualization
- Stock Inventory: Complete CRUD operations with status tracking
- Import History: Detailed logging of all data imports
- User Authentication: Secure JWT-based authentication
- Dashboard Analytics: Real-time insights and statistics
- Frontend: Next.js 15, React 18, TypeScript
- Styling: Tailwind CSS, shadcn/ui components
- Backend: Next.js API Routes, Node.js
- Database: MongoDB Atlas
- Authentication: JWT (JSON Web Tokens)
- AI Services: Google Cloud Vision, Google Vertex AI
- File Processing: CSV Parser, XLSX, PDF Parse
- Deployment: Vercel (recommended)
- Node.js 18+
- npm or yarn
- MongoDB Atlas account
- Google Cloud Platform account
- Git
-
Clone the repository
git clone https://github.com/antriksh999/smartstock-ai.git cd smartstock-ai -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Fill in your environment variables:
# Database MONGODB_URI=your_mongodb_connection_string # Authentication JWT_SECRET=your_jwt_secret_key # Google Cloud GOOGLE_APPLICATION_CREDENTIALS=./path-to-service-account.json GOOGLE_CLOUD_PROJECT_ID=your_project_id GOOGLE_VISION_API_KEY=your_vision_api_key
-
Set up Google Cloud Services
- Enable Vision AI and Vertex AI APIs
- Download service account credentials
- Place the JSON file in your project root
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Register/Login: Create an account or sign in
- Upload Data: Use drag & drop or camera to upload inventory files
- AI Processing: Let AI extract and organize your data
- Manage Inventory: View and manage your stock items
- Track History: Monitor all import activities
smartstock-ai/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β βββ dashboard/ # Dashboard pages
β βββ data-import/ # Import functionality
β βββ page.tsx # Home page
βββ components/ # Reusable UI components
βββ lib/ # Utility functions
β βββ database.ts # MongoDB operations
β βββ data-processor.ts # AI processing logic
β βββ google-cloud.ts # Google Cloud integration
βββ public/ # Static assets
βββ types/ # TypeScript definitions
| Variable | Description | Required |
|---|---|---|
MONGODB_URI |
MongoDB connection string | β |
JWT_SECRET |
JWT secret for authentication | β |
GOOGLE_APPLICATION_CREDENTIALS |
Path to Google service account | β |
GOOGLE_CLOUD_PROJECT_ID |
Google Cloud project ID | β |
GOOGLE_VISION_API_KEY |
Google Vision API key | β |
The application is currently deployed on Vercel. To deploy your own instance:
-
Fork this repository
-
Connect to Vercel
- Go to vercel.com
- Import your GitHub repository
- Choose "Next.js" framework
-
Set environment variables in Vercel Dashboard:
NEXTAUTH_SECRET=your-nextauth-secret NEXTAUTH_URL=https://your-domain.vercel.app MONGODB_URI=your-mongodb-connection-string JWT_SECRET=your-jwt-secret GOOGLE_VISION_API_KEY=your-google-vision-key GOOGLE_CLOUD_PROJECT_ID=your-google-project-id RESEND_API_KEY=your-resend-key (optional) UPLOADTHING_SECRET=your-uploadthing-secret (optional) UPLOADTHING_APP_ID=your-uploadthing-app-id (optional)
-
Deploy
- Vercel will automatically build and deploy
- Access your live application!
-
Build the project
npm run build
-
Start production server
npm start
# Use the official Node.js image
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Expose port
EXPOSE 3000
# Start the application
CMD ["npm", "start"]- Multi-format File Processing: CSV, Excel, PDF, and image support
- AI-Powered Data Extraction: Google Cloud Vision integration
- Real-time Dashboard: Interactive charts and analytics
- Secure Authentication: JWT-based user management
- Responsive Design: Mobile-first, modern UI
- Database Integration: MongoDB Atlas with optimized queries
- Import History: Complete audit trail of all imports
- Error Handling: Comprehensive error management and logging
- Build Status: β Passing
- TypeScript: β Type-safe codebase
- ESLint: β Code quality maintained
- Deployment: β Live on Vercel
- Database: β MongoDB Atlas connected
- API Integration: β All services operational
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Antriksh Sharma
- GitHub: @antriksh999
- Project Link: SmartStock AI
- Live Demo: smartstock-16h0otc5p-antriksh-sharmas-projects.vercel.app
- Next.js - React framework
- Vercel - Deployment platform
- MongoDB Atlas - Database service
- Google Cloud - AI services
- Tailwind CSS - Styling framework
- shadcn/ui - UI components
Built with β€οΈ using Next.js, TypeScript, and AI