Skip to content

Node.js, Express, and MongoDB backend with APIs for visa management, applications, filtering, and secure authentication integration.

Notifications You must be signed in to change notification settings

mahmuddevs/visa-navigator-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visa Management System - Backend

Description:

This repository contains the backend of the Visa Management System, a web application that allows users to manage visa information, apply for visas, and handle visa-related operations. The backend is built using Node.js, Express, and MongoDB, with RESTful APIs for seamless integration with the frontend.

Key Features

  1. 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.
  2. Visa Application Management

    • Submit visa applications.
    • Retrieve applications by user email.
    • Delete specific visa applications.
  3. User Authentication Integration

    • Routes designed to integrate with user authentication for personalized data retrieval.
  4. Filtering and Searching

    • Filter visas by type or retrieve user-specific visas and applications based on email.
  5. Database Operations

    • Optimized MongoDB queries with upsert and sorting capabilities.
    • Ensure efficient data handling and avoid duplicate entries with query checks.

API Endpoints

Visa Routes

  • 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.

Visa Application Routes

  • 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.

NPM Packages Used

  1. express - Web framework for building RESTful APIs.
  2. cors - Enable Cross-Origin Resource Sharing.
  3. dotenv - Manage environment variables.
  4. mongodb - MongoDB client for database operations.

.env Setup

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

Local Installation Guide

Follow the steps below to set up and run the project locally:

  1. Clone the repository:
  2. Run npm install
  3. Run npm run start for node or npm run dev for nodemon

About

Node.js, Express, and MongoDB backend with APIs for visa management, applications, filtering, and secure authentication integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published