This project is the backend for the Voice Assistant application. It is built with Node.js, Express, and TypeScript. It exposes endpoints to process audio and handle the voice assistant logic.
- RESTful API for voice processing.
- Audio file handling using Multer.
- Data validation with Zod.
- Integration with groq-sdk for advanced processing.
- Error handling middleware.
- Node.js >= 18.x
- npm >= 9.x
npm installnpm run dev– Starts the server in development mode with auto-reload.npm run build– Compiles the TypeScript project to JavaScript.npm start– Runs the server in production mode (requires prior build).
- Express
- Multer (file handling)
- groq-sdk (voice processing)
- zod-form-data (form validation)
- CORS
src/– Main source code.src/controllers/– Route controllers.src/routes/– API route definitions.src/middlewares/– Custom middlewares.src/schemas/– Validation schemas.src/utils/– Utilities and external clients.src/config/– App configuration.
-
Install dependencies:
npm install
-
Start the server in development mode:
npm run dev
The server will listen by default at http://localhost:3000.
-
For production:
npm run build npm start
- Make sure to configure any required environment variables in a
.envfile if needed. - This backend is intended to be consumed by the frontend located in the
client/folder.