100
SEO
88
Accessibility
92
Best practices
100
Desktop Performance Score
92
Mobile Performance Score
Cumulative Layout Shift: 0
First Contentful Paint: 0.8 s
Largest Contentful Paint: 1.1 s
Speed Index: 2.3 s
Total Blocking Time: 340 ms
Time to Interactive: 3.3 s
Cumulative Layout Shift: 0
First Contentful Paint: 0.3 s
Largest Contentful Paint: 0.3 s
Speed Index: 0.7 s
Total Blocking Time: 0 ms
Time to Interactive: 1 s
Projects technologies
TLDR of the project is to deploy a web application, built with Next.js to be an API and a public facing website to display the recent earthquakes in Iran and close proximity regions. In addition to next.js app, there will be a packaged application with Capacitor.js to build a vite React SPA for android ( it should be possible to build the application for other platforms, but might not be possible with the short time window ). All the source code will be inside a single mono repository.
As of 20st july 2022, Iranian Seismological Center website lacks, ssl certificate, responsible design for mobile devices, and any sort of modern design, goal of this project is to make a better version for regular users.
Deployment will be standardized with docker, therefore hosting progress will be the same across the different hosts. Currently the web version is hosted on https://earthquake-monitoring.amir4rab.com and the pwa version is hosted on https://pwa.earthquake-monitoring.amir4rab.com.
you need to run the following commands to start databases in docker
cd /docker # You might need to change "docker compose" to "docker-compose" docker compose -f docker-compose.dev.yml up -d
you need to run the following commands to start a development server:
cd /web pnpm install # Installing dependencies pnpm run init-prisma-schema # Generating prisma types pnpm run prisma-migrate-dev # Applying schemas to database pnpm run dev # Starting the development server
you need to run the following commands to do the initial setup:
cd /mobile pnpm install # Installing dependencies pnpm run prisma-types # generating prisma types
Then you can start PWA development by the following command
pnpm run pwa-dev # Starting the development server
Or run the following command to start dev server with android env files
pnpm run android-dev # Starting the development server
you need to run the following commands to start a development server:
cd /web pnpm install # Installing dependencies pnpm run init-prisma-schema # Generating prisma types pnpm run prisma-migrate-dev # Applying schemas to database pnpm run dev # Starting the development server
you need to run the following commands to start hosting server, keep in mind in case your server user is root, you need to make some changes in web Dockerfile. Before hosting your application you have to update couples of env files in "compose.prod.yml", we recommend making a copy of the original file and applying your changes to the copied version.
cd /docker cp docker-compose.prod.yml docker-compose.local.yml # then update the new file and add your env files # You might need to change "docker compose" to "docker-compose" docker compose -f docker-compose.local.yml up -d