This is the backend service for the VCompGuide project. It is built using the NestJS framework and utilizes a variety of powerful third-party APIs for AI, mapping, weather, and media storage.
This project is built with TypeScript and relies on several key technologies and integrations:
- Core Framework: NestJS (
@nestjs/core,@nestjs/common). - Database: MongoDB object modeling using Mongoose (
@nestjs/mongoose,mongoose). - Authentication & Security: Token-based authentication using Passport and JWT (
@nestjs/jwt,passport-jwt), with password hashing viabcrypt. - AI Integrations:
- Google Gemini AI (
@google/generative-ai). - HuggingFace Inference API (
@huggingface/inference).
- Google Gemini AI (
- Location Services: Google Maps API integration (
@googlemaps/google-maps-services-js). - Weather Services: OpenWeather API integration.
- Media Management: File uploads and cloud storage via Cloudinary (
cloudinary,streamifier). - API Documentation: OpenAPI/Swagger integration (
@nestjs/swagger).
Make sure you have the following installed on your local machine:
- Node.js (Project is configured for standard Node.js environments)
- npm or Yarn package manager
- A running MongoDB instance
Before running the application, you must configure your environment variables.
- Copy the provided
.env.examplefile to a new file named.env. - Fill in the required values for the following keys:
CORE_DB_URI= # Your MongoDB connection string
JWT_SECRET= # Secret key for JWT signing
GEMINI_API_KEY= # Your Google Gemini API Key
GOOGLE_MAPS_API_KEY= # Your Google Maps API Key
HUGGINGFACE_TOKEN= # Your HuggingFace Access Token
OPENWEATHER_API_KEY= # Your OpenWeather API Key
CLOUDINARY_NAME= # Your Cloudinary cloud name
CLOUDINARY_API_KEY= # Your Cloudinary API Key
CLOUDINARY_API_SECRET= # Your Cloudinary API Secret
LOCAL_AUTHENTICATION_KEY= # Key for local authentication strategiesInstall the project dependencies using npm:
npm installThe package.json includes standard NestJS scripts to run the server:
# Development mode
npm run start
# Watch mode (reloads on file changes)
npm run start:dev