02 · AI business assistant
REPLIVO
A secure workspace for small businesses to manage enquiries and draft knowledge-grounded responses with selectable tone and human approval.
Designed role-based data isolation, email verification, analytics and a modular API architecture around an approval-first AI workflow.
How REPLIVO Works
REPLIVO is a full-stack AI business assistant designed to help small and medium-sized businesses manage customer enquiries and produce high-quality reply drafts. It brings customer records, enquiry tracking, business knowledge, and AI-assisted response generation into one centralised workspace for business owners.
1. User Authentication and Account Access
The system begins with a secure registration and login process. New users create an account with their name, email, and password. The backend hashes the password and stores the account in PostgreSQL, then sends a one-time email verification code.
Once the user verifies their email, the system issues a JWT access token. That token is stored on the frontend and included with subsequent API requests, so only authenticated users can access protected business data. The platform also includes a forgot-password workflow: users request a reset code by email, then set a new password after the code is validated.
Unlike a multi-role tenant/manager system, REPLIVO is built as a business-owner workspace. After authentication, each user works within their own business context rather than switching between separate customer and staff portals.
2. Business Setup and Owner Dashboard
After logging in, the user creates a business profile containing details such as business name, industry, contact email, and description. This profile becomes the foundation for the rest of the system: customers, enquiries, knowledge base entries, and AI responses are all scoped to that business.
The dashboard then acts as the central overview for the workspace. It summarises key activity, including the number of customers, total enquiries, pending enquiries, and approved AI responses. From here, the user can navigate into customers, enquiries, knowledge base management, or business settings without leaving the application.
3. Customer and Enquiry Management Workflow
Business owners can create and manage customer records directly in the platform, including name, email, and phone details. When a customer enquiry arrives—whether through email, social media, phone, or another channel—the owner logs it in REPLIVO against the relevant customer.
Each enquiry includes a subject, message, optional category, and status such as pending, in progress, or resolved. The React frontend sends this information to the FastAPI backend through a REST API. The backend validates the data, links the enquiry to the correct business and customer, and stores it in PostgreSQL.
From the enquiry detail page, the owner can update the enquiry content or status as work progresses. This gives the business a consistent internal record of customer questions and their resolution state, instead of relying on scattered inboxes and notes.
4. Knowledge Base Workflow
Before generating AI replies, the business can build a knowledge base of trusted information such as pricing, opening hours, service details, policies, and FAQs. Each entry includes a title, content, and source type.
These entries are stored against the business profile and later provided as context when the AI drafts a response. This design is intentional: the system is meant to ground replies in the business’s own information rather than inventing unsupported details. As a result, the quality of AI drafts improves as the knowledge base becomes more complete.
5. AI Response Generation and Review Workflow
Once an enquiry has been recorded, the business owner can open the AI Response Review page and generate a draft reply. The frontend requests a new draft from the backend, which gathers:
- the enquiry subject and message
- the related customer details
- the business profile
- the business knowledge base entries
- an optional tone setting such as professional, friendly, or concise
The backend then calls the OpenAI API with that context and stores the generated reply as an unapproved draft. The owner can review the text, edit it, save changes, regenerate a new version, or approve the final draft.
This human-in-the-loop step is a core part of the workflow. AI accelerates drafting, but the business owner remains responsible for checking accuracy and tone before the reply is treated as ready to send.
6. Approved Reply Delivery Workflow
After a draft has been approved, the owner can send it to the customer by email. The backend checks that the response is approved, that it has not already been sent, and that the customer has an email address. It then delivers the reply through SMTP and records a sent timestamp against the response.
This completes the end-to-end enquiry loop:
Customer question arrives → enquiry is logged → AI draft is generated → owner reviews and approves → reply is emailed to the customer
By keeping drafting, approval, and delivery in the same system, REPLIVO reduces the gap between receiving an enquiry and sending a polished response.
7. Backend and Data Flow
REPLIVO uses a layered full-stack architecture. The React frontend is responsible for the user interface, form handling, protected routing, and API communication. The FastAPI backend contains the application’s business logic and exposes REST endpoints for authentication, business setup, customers, enquiries, knowledge base entries, and AI responses.
The backend validates incoming requests with Pydantic schemas, enforces authentication through JWT dependencies, and persists data with SQLAlchemy and PostgreSQL. Database schema changes are managed with Alembic migrations. Supporting services handle password hashing, email delivery, and OpenAI draft generation.
A typical request follows this flow:
User action → React interface → REST API request → FastAPI business logic → PostgreSQL database / OpenAI / SMTP → API response → Updated interface
8. Development Approach
The project was developed iteratively, starting with core authentication and business-scoped CRUD features, then expanding into AI draft generation, approval, and email delivery. Environment-based configuration was used for database access, JWT secrets, OpenAI credentials, and SMTP settings so local development could run safely without exposing secrets.
Local development uses a React Vite frontend and a FastAPI backend with PostgreSQL. Email verification and password-reset codes can be logged to the server console when SMTP is not configured, which made authentication testing practical during development. AI features were validated against real OpenAI API calls once API credits were available.