Hook&Grab is a project developed for Odyssea's 2nd Blue & Circular Economy Hackathon. Its purpose is to provide information and resources related to blue and circular economy practices in an engaging, interactive manner.
- Frontend: React, Vite, Bootstrap, React Router
- Backend: Node.js, Express, CORS, Body-Parser
- Database: SQLite3
- Other Tools: Axios for HTTP requests, Prettier for code formatting, Nodemon
Before you begin, ensure you have met the following requirements:
- Node.js: Download and install Node.js
- npm: Node Package Manager (included with Node.js)
To run both the backend and frontend simultaneously, follow these steps:
-
Clone the Repository:
git clone https://github.com/<your-username>/hook-and-grab.git cd BlueEco-pedia
-
Start the Application: At the root of the project, run:
npm start
- This command will:
- Automatically install all necessary dependencies for both backend and frontend.
- Launch both the backend and frontend servers concurrently.
- Backend Server: Runs at
http://localhost:3482 - Frontend Server: Runs at
http://localhost:5173
- This command will:
To maintain consistent code formatting across the project, use the following commands:
-
Format Both Frontend and Backend:
npm run format
-
Format a Specific Directory: Navigate to the desired directory (e.g.,
frontendorbackend) and run:npm run format
A graphical API tester is available to interactively test the API endpoints.
- Location:
docs/resources/api_tester - How to Run:
- Navigate to the API tester directory:
cd docs/resources/api_tester - Start the HTTP server:
npm start
- Note: This will also install missing dependencies
- Open your browser and go to
http://localhost:2502/to access the GUI.
- Navigate to the API tester directory:
An alternative Python-based API test suite is also available for testing the API.
- Location:
docs/resources/api_test_suite.py - How to Use:
- Ensure you have Python installed.
- Navigate to the test suite directory:
cd docs/resources - Run the test script:
python api_test_suite.py
- Note: This script provides basic API testing functionalities and is less feature-rich compared to the GUI-based tester.
- Main Documentation: docs/index.md
