UI prototype generation from requirements descriptions using Mistral AI.
Developed as part of the Sber X PROSTO X ITMO Hackathon
npm installCreate a .env file in the project root:
MISTRAL_KEY=QWERTYEXAMPLEOptional:
MISTRAL_MODEL=mistral-small-latest
API_PORT=3001
SERVER_PORT=3000
DATABASE_URL=postgresql://user:pass@localhost:5432/mistralproto PostgreSQL is used to store sessions and dialogues for the API. The database schema is created automatically when the API starts, or can be created manually:
npm run db:migrateCLI:
npm startEnter your requests in the console. Files from the input/ directory are supported (.txt, .pdf, .docx).
exit— exit the applicationsave— save the latest result tooutput/- Filename (e.g.
requirements.txt) — load text from theinput/directory
API Server:
npm run apiAPI: http://localhost:3001 (or the port specified by API_PORT).
Sessions and dialogues (when DATABASE_URL is configured):
POST /api/sessions— create a sessionPOST /api/sessions/:id/dialogues— create a dialogueGET /api/sessions/:id/dialogues— get a list of dialoguesGET /api/dialogues/:id?session_id=— get a dialogue with its messagesPOST /api/dialogues/:id/send— send a message, run the pipeline, and save the result to the database
WEB:
src/frontend/index.html
