Welcome to the Global Catalog of Earthquakes app! This application provides features to import and analyze global earthquake data. Let's get started!
Here is working playground: https://earthquakes.lyashenko.pro/graphql
Make sure you have the following installed:
- Node.js
- Docker
- pnpm
-
Copy the example environment variables:
cp ./env.example ./.env
-
Start the database for local development:
docker-compose up
-
Install the required modules:
pnpm i
-
Run the server:
pnpm run start
-
Run database migrations to set up the schemas:
pnpm run migration:run
To import earthquake data, use the following mutation with the correct dataset URL:
mutation ImportEarthquakes($fileUrl: String!) {
importEarthquakes(fileUrl: $fileUrl)
}
Dataset URL: earthquakes1970-2014.csv
🎉 Now you have a fully working development environment!
For database migrations, use the following commands:
-
Generate a migration file if you've made changes to your entities or related types:
pnpm run migration:generate
-
Run unprocessed migrations:
pnpm run migration:run
-
You dont need it)):
migration:revert
Ensure your code adheres to the project's standards with these commands:
-
Check code format:
pnpm run check-format
-
Check types:
pnpm run check-types
-
Fix all file styles:
pnpm run format
-
Lint all files:
pnpm run lint
I'm having a lot of fun with this project I'd like to improve a lot of things here, but I'm very short on time! Here are a few ideas:
- Split data into different tables and set up relations & indexes
- Implement vector search
- Connect Metabase and display nice charts
- Improve the importing process to create an import record in the database with ID, file name, and file hash sum, with a relation to each record
- Rewrite all in Rust xD
Made with ❤️ by Nikita Lyashenko