-
Visa Management
- Add, edit, and delete visa details.
- Retrieve all visas or filter visas by type.
- Access the latest visas with sorting and limit options.
-
Visa Application Management
- Submit visa applications.
- Retrieve applications by user email.
- Delete specific visa applications.
-
User Authentication Integration
- Routes designed to integrate with user authentication for personalized data retrieval.
-
Filtering and Searching
- Filter visas by type or retrieve user-specific visas and applications based on email.
-
Database Operations
- Optimized MongoDB queries with upsert and sorting capabilities.
- Ensure efficient data handling and avoid duplicate entries with query checks.
- GET
/all-visas
- Fetch all visa records. - GET
/latest-visas
- Fetch the latest visas (limited to 6). - POST
/add-visa
- Add a new visa record. - POST
/my-visas
- Fetch visas by user email. - POST
/visas/filter-by-visa-type
- Filter visas by visa type. - GET
/visas/:id
- Fetch details of a specific visa by ID. - PUT
/visas/:id
- Update an existing visa by ID. - DELETE
/visas/:id
- Delete a specific visa by ID.
- POST
/application/my-applications
- Fetch all applications for a user by email. - POST
/application/add
- Add a new visa application. - DELETE
/application/my-applications/:id
- Delete a specific visa application by ID.
- express - Web framework for building RESTful APIs.
- cors - Enable Cross-Origin Resource Sharing.
- dotenv - Manage environment variables.
- mongodb - MongoDB client for database operations.
To securely manage environment variables, create a .env
file in the root of your project and include the following:
PORT = port number
DB_USER = username
DB_Pass = db pass
Follow the steps below to set up and run the project locally:
- Clone the repository:
- Run npm install
- Run npm run start for node or npm run dev for nodemon