Skip to content

Commit

Permalink
Update README.md (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
guibranco authored Nov 22, 2024
1 parent 530e1cd commit 0554607
Showing 1 changed file with 69 additions and 41 deletions.
110 changes: 69 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,78 @@
# React + TypeScript + Vite
# API BR - Catalog

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
## Purpose
The **API BR - Catalog** project serves as the central catalog page for the [API BR](https://github.com/apibr) project, listing and linking various services available. The catalog is organized by service type and includes the following services:

Currently, two official plugins are available:
### Available Services
- **Developer Vacancies**
- REST API for accessing developer job vacancies via GitHub repositories.
- UI built with React.

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
- **Sports Agenda**
- REST API for retrieving football (soccer) schedules.
- UI built with React.

## Expanding the ESLint configuration
The catalog provides an intuitive, visually appealing user interface for easy navigation and access to the API services.

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
## Tech Stack
The project is built using the following technologies:
- **Vite**: A modern, fast build tool.
- **React**: JavaScript library for building user interfaces.
- **SWC**: A super-fast TypeScript/JavaScript compiler used for faster builds and optimized development experience.
- **TypeScript**: Strongly typed JavaScript, ensuring type safety across the project.

- Configure the top-level `parserOptions` property like this:

```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
## How to Build
To build the project, use the following command:
```bash
npm run build
```
This will bundle the project for production and optimize the assets.

## How to Test
The project is set up with **Vitest** for testing. You can run the following commands:

- Run all tests:
```bash
npm run test
```

- Run tests with coverage:
```bash
npm run test:coverage
```

Vitest will run the tests and display the results, including code coverage.

## Semantic Versioning (SemVer) with GitVersion
This project follows **Semantic Versioning** (SemVer), which ensures that version numbers reflect the nature of changes made to the codebase. The versioning is automatically managed using **GitVersion** version 6.

- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:

```js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
})
- **Patch Version**: Incremented for backward-compatible fixes.
- **Minor Version**: Incremented for backward-compatible new features.
- **Major Version**: Incremented for incompatible changes or breaking changes.

GitVersion generates the version number based on commit history and versioning rules. To calculate the version, simply use the following command:
```bash
gitversion
```
This will output the current version based on the repository's Git history.

## Installation
To set up the project locally, follow these steps:

1. Clone the repository:
```bash
git clone https://github.com/apibr/catalog.git
```

2. Navigate to the project folder:
```bash
cd catalog
```

3. Install dependencies:
```bash
npm install
```

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

0 comments on commit 0554607

Please sign in to comment.