This project is a TypeScript-based backend for a business registration and verification system. It utilizes MongoDB for data storage, Express.js for server handling, Zod for input validation, Multer for file uploads, Resend for email verification, and Cloudinary for image storage.
All APIs have been successfully tested, ensuring that verification emails are sent to the provided email addresses.
- Business Registration API
- Email Verification API
- Proper Input Validations using Zod
- Secure File Upload Handling using Multer & Cloudinary
- Resend API for Email Verification
- Well-structured TypeScript Codebase
git clone ]https://github.com/udayasish/Translense-Backend-Task.git
cd Translense-Backend-Tasknpm installA .env file has been provided with all necessary environment variables.
npm run startThe server will start running on http://localhost:8000 (or the specified port in your environment variables).
Endpoint: POST /api/business/business
- Body (multipart/form-data):
{ "businessName": "Tech Solutionns Ltd.", "country": "Bharat", "state": "Assam", "city": "Guwahati", "address": "123 Markett St, SF", "openingTime": "06:00 AM", "closingTime": "04:00 PM", "email": "contact@techsol.com", (eneter valid email for email generation) "mobile": "+1 415-555-1234", "file": (image file) } - Response:
{ "statusCode": 201, "message": "Business created successfully", "data": { ... } }
Endpoint: POST /api/business/verify
- Body (JSON):
{ "businessName": "Tech Solutionns Ltd.", "code": "123456" } - Response:
{ "statusCode": 200, "message": "Business verified successfully" }
- TypeScript - Strongly typed JavaScript
- Express.js - Backend framework
- MongoDB - NoSQL database
- Zod - Input validation
- Multer - File uploads
- Resend - Email verification service
- Cloudinary - Image storage
This backend was developed as part of a backend engineering task with the following requirements:
- Architect the database using MongoDB.
- Create all necessary APIs to support business registration & verification.
- Implement proper input validations with Zod.
- Follow best coding practices with a clean, scalable codebase.
All APIs have been tested successfully with emails sent to the provided addresses.