Skip to content

yonieas/frontend-react-ts

Repository files navigation

React + TypeScript + Vite

Frontend React TypeScript

This project is a modern frontend web application built with React, TypeScript, Vite, and Tailwind CSS.


🚀 Getting Started

1. Install Dependencies

Make sure you have Node.js (v16 or newer) and npm installed.

Clone the repository and install dependencies:

git clone <your-repo-url>
cd frontend-react-ts
npm install

2. Running the App

To start the development server:

npm run dev

The app will be available at http://localhost:5173 (or the port shown in your terminal).

3. Build for Production

npm run build

4. Preview Production Build

npm run preview

🔗 Connecting to Backend Services

  1. Configure API Endpoint:

    • Edit the API base URL in src/services/api.tsx or your relevant API config file.
    • Example:
      // src/services/api.tsx
      const API_BASE_URL = 'http://localhost:8000/api'; // Change to your backend URL
  2. Start your backend server (make sure it is running and accessible from the frontend).

  3. Environment Variables (Optional):

    • You can use a .env file to store API URLs or secrets. Example:
      VITE_API_BASE_URL=http://localhost:8000/api
    • Access it in your code with import.meta.env.VITE_API_BASE_URL.

📦 Tech Stack


🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.


📄 License

MIT This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json'],
    tsconfigRootDir: __dirname,
  },
}
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list

About

This in example of simple Frontend using React Typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors