Giter Site home page Giter Site logo

b7-locator-front-end's Introduction

B7-Locator Frontend with React and Typescript

Project Structure

  • src: Contains the source code for the React application.

    • config/axios: Configuration for Axios, including backend URL.
    • authentication: Manages the user state using UserProvider.
    • components: Reusable UI components.
    • routes/sections: Contains sections of the application, organize routes.
    • pages: React components representing different pages/routes of the application.
    • section: Page views with API folder inside.
    • utils: Utility functions for handling other data-related tasks.
    • App.tsx: Main application component.
    • index.tsx: Entry point of the application.
  • public: Contains static assets like images, fonts, etc.

  • vite.config.ts: Configuration file for Vite.

  • global.d.ts: Type declaration file for global types or interfaces.

Installation

  1. Clone the repository:

    git clone https://github.com/daptheHuman/b7-locator-front-end/
  2. Navigate to the project directory:

    cd b7-locator-front-end
  3. Install dependencies:

    npm install

Environment Variables

To configure environment-specific variables, you can use a .env file in the root directory of the project.

.env Configuration

  • VITE_APP_BACKEND_URL: The URL of the backend API server.

Creating or Updating the .env File

  1. If you haven't already, create a copy of the provided .env.sample file:

    cp .env.sample .env
  2. Open the .env file in a text editor.

  3. Add or update the variable with the appropriate value

  4. Save the changes to the .env file.

Running the Application

After setting up the .env file with the desired variable, you can run the development server as usual:

npm run dev

This will start the development server with the specified backend URL. Any API requests made from the frontend will be directed to this URL.

Available Scripts

  • npm run dev: Start the development server.
  • npm run build: Build the production-ready bundle.
  • npm run serve: Serve the production build locally for testing.
  • npm run lint: Run ESLint to check for linting errors.
  • npm run format: Format code using Prettier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.