AI-Powered Procurement Platform
Introduction
A platform designed to streamline procurement processes, leveraging AI to automate and enhance user interactions, data management, and decision-making. It simplifies procurement management, automates repetitive tasks, and provides intelligent assistance, reducing manual effort and errors.
Key Features & User Experience
- Frontend:
Built with Next.js and React, offering modules for procurement forms, chat, questions, history, and user selection. - Backend:
FastAPI server with modular routing, Prisma ORM for database access, and robust middleware (CORS, logging, error handling). - Database:
PostgreSQL managed via Prisma, with aCollection
model for user procurement data. - AI Integration:
The backend is designed to handle AI APIs (OpenAI integration is referenced), suggesting features like smart chat, automated form filling, or intelligent recommendations.
Tech Stack
Frontend: Next.js, React, Tailwind CSS
Backend: FastAPI (Python), Uvicorn, Prisma ORM
Database: PostgreSQL (via Prisma)
AI/ML: OpenAI API (NLP tasks), dotenv for config
Infrastructure: SSL support, CORS, environment-based config
AI System Details
- Role:
AI powers backend APIs, likely for chat, question answering, and smart procurement suggestions. - Integration:
Uses OpenAI API via environment variable, integrated into FastAPI endpoints. - Tasks:
Natural language processing, possibly classification, summarization, or conversational AI. - Challenges:
Secure API key management, async integration, error handling, and ensuring AI responses are relevant to procurement.
Technical Breakdown
- Database:
Collection
model: stores user procurement data, actions, timestamps.- Uses Prisma for async, type-safe queries.
- Backend:
- Modular FastAPI app with routers for procurement actions.
- Middleware for CORS and logging.
- Prisma client with retry logic for robust DB connections.
- API endpoints for creating and deleting collections.
- Frontend:
- Modular React components for each procurement function.
- Main page focuses on user selection, with other modules likely loaded as needed.
User Journey Walkthrough
- User visits the platform
β Sees a clean UI with user selection (e.g., buyer, seller, agent). - User selects their role
β Frontend loads relevant modules (form, chat, history, questions). - User interacts (e.g., fills form, asks questions, chats)
β Frontend sends requests to FastAPI backend. - Backend processes request
β If AI is needed (e.g., chat, question answering), backend calls OpenAI API. - Database operations
β User actions (create/delete collections) are stored/retrieved via Prisma. - AI response or DB result returned
β Backend sends processed data or AI-generated content to frontend. - User sees results
β UI updates with new information, chat responses, or confirmation messages.
Text-Based Flowchart / Architecture
User
β
Frontend (Next.js/React)
β
[User Selection] β [Procurement Form] β [Chat] β [Questions] β [History]
β
API Request (REST)
β
Backend (FastAPI)
β [Router: /api/db/collection/create | /delete]
β [AI Logic: OpenAI API call if needed]
β [Database: Prisma ORM β PostgreSQL]
β
Response
β
Frontend UI Update
β
User sees result
Conclusion
This procurement platform demonstrates a modern, AI-powered approach to business process automation. The combination of a robust FastAPI backend, a modular Next.js frontend, and seamless AI integration showcases the teamβs technical depth and creativity. The use of Prisma and PostgreSQL ensures data integrity and scalability, while OpenAIβs NLP capabilities add intelligence and automation.
Future plans:
- Expand AI features (e.g., predictive analytics, document processing)
- Deeper workflow automation
- Broader integration with enterprise systems