An AI-powered document template generation and management system that helps create, customize, and manage legal and business documents.
- Document analysis engine to scan existing documents
- Variable detection and extraction capability
- Template storage and management interface
- Rule-based document adaptation system
- Conditional logic for document sections
- Personalization engine based on user inputs
- Situational context analyzer
- Identify complex legal terms in documents
- Provide plain-language explanations
- Contextual information for better understanding
- User profile/data repository to store previously entered information
- Data retrieval system for auto-filling forms
- Duplicate information detection
saafi/
├── backend/ # Node.js Express backend
│ ├── config/ # Configuration files
│ ├── middleware/ # Custom middleware
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── services/ # Business logic services
│ ├── uploads/ # Document uploads storage
│ └── server.js # Main server file
├── frontend/ # React frontend
│ ├── public/ # Static files
│ └── src/ # Source files
│ ├── components/ # React components
│ ├── services/ # API service calls
│ └── utils/ # Utility functions
- Node.js (v14 or higher)
- MongoDB (optional for full functionality)
- OpenAI API key (optional for AI features)
-
Clone this repository:
git clone https://github.com/omarionnn/docu.git cd docu -
Run the setup script:
chmod +x setup.sh ./setup.sh
-
Start the application:
chmod +x start-dev.sh ./start-dev.sh
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Navigate to the "Create New Template" page
- Drag and drop a document (PDF, DOCX, TXT) or click to browse files
- Fill in template details (name, description, category, tags)
- Click "Create Template" to process the document
- Select a template from your library
- Create custom rules to show/hide sections based on variables
- Use the Context tab to analyze document fit for specific situations
- Generate AI-powered text to include in the document
- Preview changes in real-time
- Select text containing legal terminology
- Use the Legal Term Explainer to get plain-language explanations
- View contextual information about the term's implications
The application is structured with a React frontend and Node.js/Express backend. The setup scripts will install all necessary dependencies.
Create a .env file in the backend directory with the following variables:
PORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/saafi
JWT_SECRET=your-secret-key
OPENAI_API_KEY=your-openai-api-key
Create a .env file in the frontend directory with:
REACT_APP_API_URL=http://localhost:5000
MIT