Skip to content

Commit

Permalink
refactor: revamp the entire project 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
stambolievv committed Nov 25, 2023
1 parent 109b2ef commit d71b845
Show file tree
Hide file tree
Showing 107 changed files with 4,248 additions and 2,147 deletions.
54 changes: 8 additions & 46 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,8 @@
#---------------------------------------#
# Project Ignores #
#---------------------------------------#

# Dependency directories
node_modules
package-lock.json

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Editor
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Distribution
dist
dist-ssr
build
public
*.zip
*.local

# Docmentation
docs
*.md

# Misc
*.todo
todo.*
**/.git
**/.svn
**/.hg
# Ignore everything
/*

# Except these files
!/src
!/src/*
!/tests
!/tests/*
85 changes: 19 additions & 66 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,94 +1,47 @@
{
"root": true,
"extends": ["eslint:recommended", "plugin:jsdoc/recommended", "plugin:import/recommended"],
"plugins": ["jsdoc", "import"],
"extends": ["eslint:recommended", "plugin:jsdoc/recommended", "plugin:import/recommended", "plugin:promise/recommended"],
"parser": "@babel/eslint-parser",
"plugins": ["jsdoc", "import", "promise"],
"env": {
"es6": true,
"browser": true,
"node": true,
"shared-node-browser": true,
"es6": true,
"mocha": true
"shared-node-browser": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true,
"modules": true,
"classes": true,
"jsx": true
}
"requireConfigFile": false
},
"rules": {
"constructor-super": "error",
"curly": ["error", "multi-line"],
"getter-return": "error",
"indent": ["error", 2, { "SwitchCase": 1, "MemberExpression": 1 }],
"no-async-promise-executor": "error",
"no-case-declarations": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-const-assign": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-extra-boolean-cast": "error",
"no-extra-semi": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-import-assign": "error",
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-obj-calls": "error",
"no-prototype-builtins": "error",
"no-redeclare": "error",
"no-setter-return": "error",
"no-trailing-spaces": "off",
"no-unreachable-loop": ["error", { "ignore": ["ForInStatement", "ForOfStatement"] }],
"no-console": ["error", { "allow": ["info", "debug", "warn", "error"] }],
"no-trailing-spaces": "warn",
"no-unreachable-loop": "error",
"no-unused-vars": "off",
"no-var": "error",
"prefer-const": "error",
"prefer-const": "warn",
"quotes": ["warn", "single"],
"semi": ["error", "always"],
"use-isnan": "error",
"valid-typeof": ["error", { "requireStringLiterals": true }],
"import/no-unresolved": "error",
"jsdoc/check-access": "warn",
"jsdoc/check-alignment": "warn",
"jsdoc/check-indentation": "warn",
"jsdoc/check-param-names": "warn",
"jsdoc/check-property-names": "warn",
"jsdoc/check-syntax": "warn",
"jsdoc/check-tag-names": "off",
"jsdoc/check-types": "warn",
"jsdoc/check-values": "warn",
"jsdoc/empty-tags": "warn",
"jsdoc/implements-on-classes": "warn",
"jsdoc/multiline-blocks": "warn",
"jsdoc/newline-after-description": "off",
"jsdoc/no-bad-blocks": "warn",
"jsdoc/no-multi-asterisks": "warn",
"jsdoc/no-undefined-types": "warn",
"jsdoc/no-defaults": "off",
"jsdoc/no-undefined-types": "off",
"jsdoc/require-asterisk-prefix": "warn",
"jsdoc/require-description": ["warn", { "descriptionStyle": "tag" }],
"jsdoc/require-description-complete-sentence": ["warn", { "abbreviations": ["etc", "e.g.", "i.e."] }],
"jsdoc/require-description-complete-sentence": ["warn",{ "abbreviations": ["etc", "e.g.", "i.e."] }],
"jsdoc/require-hyphen-before-param-description": "warn",
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param": "warn",
"jsdoc/require-param-description": "warn",
"jsdoc/require-param-name": "warn",
"jsdoc/require-param-type": "warn",
"jsdoc/require-property": "warn",
"jsdoc/require-property-description": "warn",
"jsdoc/require-property-name": "warn",
"jsdoc/require-property-type": "warn",
"jsdoc/require-returns": "warn",
"jsdoc/require-returns-check": "off",
"jsdoc/require-returns-description": "warn",
"jsdoc/require-returns-type": "warn",
"jsdoc/tag-lines": "warn",
"jsdoc/valid-types": "error"
"import/first": "warn",
"import/newline-after-import":"warn",
"import/no-empty-named-blocks": "warn",
"promise/always-return": "off",
"promise/catch-or-return": "off"
}
}
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pnpm-debug.log*
lerna-debug.log*

# Editor
.vscode/*
.vscode
!.vscode/extensions.json
.idea
.DS_Store
Expand Down
54 changes: 8 additions & 46 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,8 @@
#---------------------------------------#
# Project Ignores #
#---------------------------------------#

# Dependency directories
node_modules
package-lock.json

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Editor
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Distribution
dist
dist-ssr
build
public
*.zip
*.local

# Docmentation
docs
*.md

# Misc
*.todo
todo.*
**/.git
**/.svn
**/.hg
# Ignore everything
/*

# Except these files
!/src
!/src/*
!/tests
!/tests/*
19 changes: 7 additions & 12 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"printWidth": 140,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false,
"rangeStart": 0
}
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "avoid"
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2022] [Deyan "stambolievv" Stamboliev]
Copyright [2023] [Deyan "stambolievv" Stamboliev]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
115 changes: 113 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,113 @@
# Car-Service
🔧 Easy and convenient way to register cars and their repairs! 🔧
# 🔧 Car-Service 🔧

<details>
<summary><b>Table of Contents</b></summary>
<ol>
<li>
<a href="#overview">Overview</a>
<ul>
<li><a href="#cars-management">Cars Management</a></li>
<li><a href="#repairs-management">Repairs Management</a></li>
</ul>
</li>
<li>
<a href="#user-specific-access">User-specific Access</a>
</li>
<li>
<a href="#features">Features</a>
<ul>
<li><a href="#search-functionality">Search Functionality</a></li>
<li><a href="#pagination">Pagination</a></li>
<li><a href="#cache-implementation">Cache Implementation</a></li>
</ul>
</li>
<li>
<a href="#getting-started">Getting Started</a>
<ul>
<li><a href="#clone-project">Clone Project</a></li>
<li><a href="#installing">Installing</a></li>
</ul>
</li>
<li>
<a href="#deployment">Deployment</a>
</li>
<li>
<a href="#license">License</a>
</li>
</ol>
</details>

## Test Credentials
To facilitate testing, you can use the following credentials:
- **Username:** admin
- **Password:** admin

**Note:** Please refrain from creating, editing, or deleting any information using these test credentials to maintain the integrity of the test environment.


## Overview
The Car-Service project is a robust web application designed for managing cars and their repairs. Users can log in or create an account, granting them exclusive access to their own set of cars and associated repairs.

![THUMBNAIL]

### Cars Management
- **Adding Cars:**
- VIN Number
- Registration Plate Number
- Make and/or Model
- Engine Type
- Customer Name

- **Operations on Cars:**
- Create: Add new car with specified details.
- Edit: Modify existing car information.
- Delete: Remove a car from the system with all repairs associated with it.

### Repairs Management
- **Viewing Repairs:**
- Clicking on the repair button for a specific car opens a dedicated page displaying all repairs associated with that particular car.

- **Operations on Repairs:**
- Create: Add new repairs, specifying details.
- Details: Access a detailed page for each repair.
- Edit: Modify existing repair information.
- Delete: Remove repairs from the system.

## User-specific Access
- Each user can only view and manage their own set of cars and repairs, ensuring data privacy.

## Features
### Search Functionality
- The Cars page features a search block allowing users to search for cars based on:

### Pagination
- Dedicated pagination is implemented on both the Cars page and the Repairs page, providing users with easy navigation through large datasets.

### Cache Implementation
- To enhance data fetching speed and ensure robust performance, the project incorporates a cache mechanism. This implementation optimizes data retrieval, providing a seamless and efficient user experience.

## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development. See deployment for notes on how to deploy the project on a live system.

### Clone project
```bash
git clone git@github.com:stambolievv/Car-Service.git
```

### Installing
Run `npm install` from the terminal

## Deployment
Open the terminal and run the desired command

| Type | Terminal Command | Description |
| :------------- | :---------------- | :----------------------------------------------------- |
| dev | `npm run dev` | Run development server for live editing |
| prod | `npm run build` | Build the project for production deployment |
| prod + preview | `npm run preview` | Preview the production build locally before deployment |

## License
This project is licensed under the Apache-2.0 License - see the [LICENSE] file for details

[LICENSE]:LICENSE
[THUMBNAIL]:/assets/images/thumbnail.png
Binary file added assets/images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/button-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d71b845

Please sign in to comment.