How erazor48/eviverse works
Project type and purpose
• EVIverse is a full-stack web application combining a FastAPI-based Python backend with a React/TailwindCSS frontend.
• Its goal is to let users generate, refine and manipulate 3D objects via an AI-driven chatbot interface.
Main components
a. Frontend
• React app (frontend/src) with pages/components (Analysis, Home, Chatbot UI, ModelViewer, Login/Register).
• Contexts (AuthContext) and services modules (auth.ts, analyses.ts, chat.ts, models.ts) handle API calls.
• Built and served via npm start (Node.js, TailwindCSS for styling).
b. Backend API
• FastAPI application (backend/app/main.py)
• Routers in backend/app/api/ (analyses.py, chat.py, users.py)
• Core utilities: backend/app/core/database.py, init_db.py for SQLAlchemy/SQLite integration
• Business logic in backend/app/services/ (auth, AI/chat orchestration, model3d processing)
• Pydantic schemas in backend/app/schemas/ and ORM models in backend/app/models/
c. Persistence layer
• SQLite database file (eviverse.db) managed via SQLAlchemy
• File storage under backend/uploads/images for user-uploaded assets and AI-generated 3D files
d. AI/ML model assets
• Potential local backend/app/models_3d or external AI service endpoints invoked from chat service
e. Scripts & environment
• setup.bat and demarrer.bat orchestrate Conda env creation, dependency installs (environment.yml, requirements.txt, package.json), and launch front+back servers
f. External services
• Third-party LLM/3D generation APIs (must be represented if used in app/services/chat.py or analysis endpoints)
Relationships & interactions
• User (browser) → React UI → HTTP(S) → FastAPI REST endpoints
• FastAPI → SQLAlchemy ORM → SQLite DB (users, analyses, model metadata)
• FastAPI → Services → AI generation engine (internal or external) → generates 3D assets
• FastAPI → writes 3D files and thumbnails → uploads/images storage
• React UI polls or streams websocket/chat responses from /api/chat for real-time feedback
• Authentication flow: React → /api/users → auth service → issues JWT or session → protected routes
Architectural patterns and design principles
• Layered architecture:
• Presentation (React UI)
• API/Controller (FastAPI routers)
• Service/Business logic (app/services)
• Data access (SQLAlchemy models & Pydantic schemas)
• Separation of concerns & single responsibility
• RESTful design for CRUD and AI-chat endpoints
• Use of dependency injection in FastAPI for database session, auth
• React Context for global state (auth, chat session)