A Mobile Repair Service That Trains Repair Technicians to Fix Computers While Exceeding Customer Expectations
This project aims to guide entry-level repair technicians from repairing simple devices like vacuum cleaners to repairing more complex devices like computers. We want to build a path from "never fixed anything in my life" to "able to fix anything and everything" while providing a high-quality, easy-to-use experience for customers
repair
├── docker
├── public
├── src
│ └── app
│ └── db
- Make sure you have docker and docker-compose installed, as well as make if you use Windows (Linux and MacOS distributives have it by default).
- Copy
.env.example
into.env
and rewrite it with your own credentials (could be left default ones for dev environment). - Run
make init
in order to build and start an application. This should be run only once at the start and after that just manipulatemake down
andmake up
. - Open http://localhost:3000 with your browser to see the result.
make build
- builds everything needed for development.make up
- starts all containers.make down
- stops and removes all containers.make docker-down-all
- stops and removes all containers and also removes mounted volumes (be careful with this command as it deletes e.g. database or any other mounted folders/files).make restart
- restarts all containers.make init
- initialize everything from the scratch.make check
- check code for errors and runs tests.make npm-install
- runsnpm install
inside container.make npm-install-package p=package_name
- installs a npm package inside container (replace "package_name" with the target package name).make npm-remove-package p=package_name
- removes a npm package inside container (replace "package_name" with the target package name).make prisma-generate
- regenerates prisma client. You need to do that whenever you make changes to your database that are reflected in the Prisma schema.make sh c=container_name
- opens a bash terminal inside "container_name" (this can be found withindocker compose ps -a
).
- To make all checks (tests, lints) run
make check
. - In order to run only linter run
make lint
. - In order to run only all tests run
make test
. - To use more complex command you can just get inside container
make sh c=repair-app
and do your stuff.
Error logs can be obtained from /var/log/error.log
inside container (make sh c=repair-app
).
Application logs can be seen by running make logs
.
Create a file named .vscode/launch.json
at the root of your project with the following content:
{
"version": "0.2.0",
"configurations": [
{
"name": "Repair: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{
"name": "Repair: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Repair: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
}
]
}
Now go to the Debug panel (Ctrl+Shift+D on Windows/Linux, ⇧+⌘+D on macOS), select a launch configuration, then press F5 or select Debug: Start Debugging from the Command Palette to start your debugging session.
Note: For
Repair: debug client-side
configuration you need to runnpm run dev
prio to a launch of this configuration.
If you have issues with a hot reload on Windows - add
.env.local
file to your root and put this line on it:
WATCHPACK_POLLING=true
Now, restar docker-compose with make restart
.
If you have an error
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
while running make
command - you need to install the Xcode Command Line Tools
(run xcode-select --install
) or reset it if has been already done (run xcode-select --reset
).
To learn more about Repair, take a look at the following resources:
- Project system design schema - learn about our project's features and structure.
Feel free to create an issue in case you see one.
In order to contribute:
- Fork current repository.
- Clone your fork with
git clone [your-clone-repo-url]
. In order to get an url you need click on the<> Code
button, and then copy needed link. Be sure that you clone your fork, not the original repository. - Add
O1SoftwareNetwork/repairs
repo as your remote -git remote add upstream [email protected]:O1SoftwareNetwork/repairs.git
. After that, you can update your fork with the main repo easily withgit pull upstream
. - Create a new feature branch (e.g.
fix/signup
oradd/assignment-page
) -git checkout -b fix/signup
. - After your job is done, commit and push your code into your repo feature branch -
git push origin fix/signup
. Make sure to push only to your forked repo. - Create a pull request from your fork repo from your feature branch into master branch of the main project repo.