DocumentAI is an intelligent document processing platform that allows users to upload, analyze, and extract insights from their documents.
- Document Upload & Management: Securely upload and organize your documents
- AI-Powered Analysis: Extract insights and key information from documents
- Project Organization: Group related documents in projects for better organization
- User Authentication: Secure access with NextAuth integration
- Responsive Design: Works on desktop and mobile devices
- Frontend: Next.js, React, Tailwind CSS
- Backend: Next.js API Routes
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js
- File Storage: Local storage (configurable for cloud services)
The project follows a modular architecture:
/src
/app # Global pages and layouts
/modules # Feature-based modules
/auth # Authentication module
/documents # Document management module
/projects # Project management module
/users # User management module
/common # Shared resources
/components # Reusable components
/lib # Utility libraries
/hooks # Custom React hooks
/utils # Utility functions
/styles # Global styles
/public # Static assets
/prisma # Prisma schema and migrations
Each module follows a consistent structure:
/module-name
/api # API routes
/components # Module-specific components
/hooks # Module-specific hooks
/services # Business logic services
/types # TypeScript type definitions
- Node.js 16+
- npm or yarn
- PostgreSQL database
- Clone the repository:
git clone https://github.com/your-username/documentai.git
cd documentai- Install dependencies:
npm install
# or
yarn install- Create a
.envfile in the root directory:
DATABASE_URL="postgresql://user:password@localhost:5432/documentai"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-here"
UPLOAD_MAX_SIZE="10485760" # 10MB in bytes
- Run Prisma migrations:
npx prisma migrate dev- Start the development server:
npm run dev
# or
yarn dev- Open http://localhost:3000 in your browser.
This project uses Prisma ORM for database management. To set up the database:
- Make sure your PostgreSQL instance is running
- Update the
DATABASE_URLin your.envfile - Run the migrations:
npx prisma migrate dev --name initTo seed the database with initial data:
npx prisma db seedCreate a production build:
npm run build
# or
yarn build- Connect your GitHub repository to Vercel
- Set up the required environment variables
- Deploy with the default settings
- Build the application
- Set up environment variables
- Run the production server:
npm start
# or
yarn start- Fork the repository
- Create a new branch:
git checkout -b feature-name - Make changes and commit:
git commit -m 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.