Merged README files for backend and frontend.

This commit is contained in:
Fabio Manganiello 2025-02-22 16:38:48 +01:00
parent 5dfde74ccf
commit 092c194358
2 changed files with 59 additions and 65 deletions

View file

@ -1,43 +1,63 @@
# GPS Tracker # GPSTracker
A web interface to render GPS data points stored in a PostgreSQL database on a map. ##### Track your GPS data, from any data source
## Installation GPSTracker is a simple Webapp that consists of:
1. Clone the repository: - A backend that:
```bash - Can read GPS data from any compatible data source (supported: `postgres`, `mysql`, `mariadb`, `mongodb`, `sqlite`,
git clone https://github.com/yourusername/gps-tracker.git `snowflake`), with arbitrary complex filtering, and expose them over a simple Web API.
cd gps-tracker - [[*TODO*]] Can ingest GPS data points from HTTP, MQTT, Websocket or Kafka.
``` - A frontend to display GPS data points and provides advanced filtering.
2. Install dependencies: ## Building the application
```bash
npm install
```
3. Create a `.env` file with the following content: ```sh
```env # Backend
DATABASE_URL=postgres://username:password@localhost:5432/gpstracker npm install
PORT=3000 npm run build
```
4. Create the `gps_data` table in your PostgreSQL database: # Frontend
```sql cd frontend
CREATE TABLE gps_data ( npm install
id SERIAL PRIMARY KEY, npm run build
latitude FLOAT NOT NULL, ```
longitude FLOAT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
```
5. Start the server: ## Configuration
```bash
npm start
```
6. Open your browser and navigate to `http://localhost:3000`. See [`.env.example`](./.env.example) for a reference. Copy it to `.env` and modify it accordingly.
## Usage ## Running the application
Add your GPS data points to the PostgreSQL ▋ ### Local installation
```sh
npm run start
```
### Docker
[[*TODO*]]
## Project Setup
### Compile and Hot-Reload for Development
#### Backend
```sh
npm run dev
```
#### Frontend
```sh
cd frontend
npm run dev
```
### Lint with [ESLint](https://eslint.org/)
```sh
npm run lint
```

View file

@ -1,56 +1,30 @@
# GPSTracker # GPSTracker [frontend]
##### Track your GPS data, from any data source This is the root folder for the GPSTracker frontend.
GPSTracker is a simple Webapp that consists of: See [main `README`](../README.md) for more information.
- A backend that: ## Building the frontend
- Can read GPS data from any compatible data source (supported: `postgres`, `mysql`, `mariadb`, `mongodb`, `sqlite`,
`snowflake`), with arbitrary complex filtering, and expose them over a simple Web API.
- [[*TODO*]] Can ingest GPS data points from HTTP, MQTT, Websocket or Kafka.
- A frontend to display GPS data points and provides advanced filtering.
## Building the application
```sh ```sh
# Backend
npm install
npm run build
# Frontend
cd frontend
npm install npm install
npm run build npm run build
``` ```
## Configuration ## Configuration
See `.env.example` for a reference. Copy it to `.env` and modify it accordingly. Imported from the root level - see [`.env.example`](../.env.example).
## Running the application ## Running the frontend
### Local installation
```sh ```sh
npm run start npm run start
``` ```
### Docker
[[*TODO*]]
## Project Setup ## Project Setup
### Compile and Hot-Reload for Development ### Compile and Hot-Reload for Development
#### Backend
```sh
npm run dev
```
#### Frontend
```sh ```sh
cd frontend cd frontend
npm run dev npm run dev