Skip to content

Leandro-Bertoluzzi/remote-cnc-workgroup

Repository files navigation

Remote CNC manager

Github top language Github language count Repository size License

🚧 Remote CNC manager 🚀 Under construction... 🚧


About   |   Features   |   Technologies   |   Requirements   |   Starting   |   License   |   Authors


🎯 About

Implementation of web app + API to remotely monitor and manage an Arduino-based CNC machine.

✨ Features

✔️ REST API
✔️ SQL database management
✔️ Real time monitoring of CNC status

🚀 Technologies

The following tools were used in this project:

✅ Requirements

Before starting 🏁, you need to have installed:

  • Node to run the Next.js app in developer mode and generate the frontend pages for production,
  • Python to run the backend,
  • Nginx to configure a production server and
  • PostgreSQL

Alternatively, if you have Docker installed, you can build and run the whole application, both in development and production mode, without installing the aforementioned programs.

More information about how to init your development environment here.

🏁 Starting

# Clone this project
$ git clone --recurse-submodules https://github.com/Leandro-Bertoluzzi/remote-cnc-workgroup

# Access
$ cd remote-cnc-workgroup

# Run the project
$ docker compose up

# The first time, you may want to run DB migrations
# Command to run the DB schema migrations
$ docker exec remote-cnc-api bash -c "cd core && alembic upgrade head"

# You can access the web app in <http://localhost:3000>
# The API will initialize in <http://localhost:8000>
# You can access adminer through <http://localhost:8080>

You can also run the project in production mode:

# Run the project in production mode
$ docker-compose -f docker-compose.yaml -f docker-compose.production.yaml up -d

🔧 Running tests

API

  • All tests:
# We run the command inside the container
$ docker exec -it remote-cnc-api make tests

App

  • Linter:
$ docker exec -it remote-cnc-app npm run lint:check
  • Unit tests:
$ docker exec -it remote-cnc-app npm run test:unit

🏁 Deployment

In order to deploy the app, you must export it as a static site. To do so, you must run the following command in development mode:

$ docker exec -it remote-cnc-app npm run build

Then, if you want, you can deploy the project with docker-compose:

# Run the project in production mode
$ docker-compose -f docker-compose.yaml -f docker-compose.production.yaml up -d

Also, take into account that you must update the environment variables.

A more comprehensive guide about the deployment here.

📝 License

This project is under license from MIT. For more details, see the LICENSE file.

✍️ Authors

Made with ❤️ by Leandro Bertoluzzi and Martín Sellart.

Back to top

Releases

No releases published

Packages

No packages published