Skip to content

LeonardoCides/KeyboardStack-API

Repository files navigation

⌨️ KeyboardStack API + Data Intelligence

Node.js JavaScript Python MySQL Express.js HTML5 CSS3

An efficient REST API designed to manage mechanical keyboard inventory with integrated Python data intelligence for automatic report generation.

Terminal Preview

🚀 Features

  • Interactive Dashboard: Modern web interface to manage stock visually.
  • Inventory Management: Full CRUD for keyboard stocks.
  • Data Intelligence: Python script for stock analysis.
  • PDF Reporting: Automatic PDF reports for low-stock items.
  • Auto-Setup: Automatic MySQL table initialization on startup.

🛠️ Technologies

  • Frontend: HTML5, CSS3, and JavaScript (Vanilla).
  • Backend: Node.js & Express.js.
  • Data Intelligence: Python 3 (FPDF & mysql-connector).
  • Database: MySQL.

🛣️ API Endpoints

Method Endpoint Description
GET /estoque Returns all items from the database
POST /estoque Adds a new product
PATCH /estoque/vender/:id Decreases quantity by 1
DELETE /estoque/:id Removes a product
GET /analise/gerar-pdf [NEW] Triggers Python script to generate/view PDF report

🏁 How to Run

  1. Clone the repository:
    git clone https://github.com/LeonardoCides/KeyboardStack-API
  2. Install Dependencies:
   npm install
  1. Install Python Dependencies::
      source venv/bin/activate  # Linux/Mac
     .\venv\Scripts\activate   # Windows
      pip install -r requirements.txt
  2. Setup Environment Variables: Create a .env file in the root directory:
    DB_HOST=localhost
    DB_USER=root
    DB_PASS=your_password
    DB_NAME=sistema_estoque
    PORT=3000
  3. Start the server:
      npm start

About

A hybrid Node.js & Python REST API for mechanical keyboard inventory management, featuring automated MySQL setup and intelligent PDF report generation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors