Skip to content

Commit

Permalink
pull from main
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriiPrudnikov committed Dec 30, 2023
2 parents 9ca4d95 + 409a780 commit 574446c
Show file tree
Hide file tree
Showing 268 changed files with 717,407 additions and 124,502 deletions.
97 changes: 59 additions & 38 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,64 @@
{
"extends": ["next/core-web-vitals", "airbnb", "airbnb-typescript"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"indent": ["error", 4, { "SwitchCase": 1 }],
"no-param-reassign": ["error", { "props": false }],
"no-plusplus": "off",
"implicit-arrow-linebreak": "off",
"extends": [
"next/core-web-vitals",
"plugin:prettier/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended"
],
"ignorePatterns": ["next.config.js", "scripts/**/*.*js"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"@next/next/no-img-element": "off",

"@typescript-eslint/indent": ["error", 4],
// TODO: remove this rule
"@typescript-eslint/no-explicit-any": "off",
// TODO: remove this rule
"@typescript-eslint/ban-ts-comment": "off",
// TODO: remove this rule
"jsx-a11y/click-events-have-key-events": "off",
// TODO: remove this rule
"jsx-a11y/no-static-element-interactions": "off",

"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-props-no-spreading": "off",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"react/require-default-props": "off",
"react/jsx-no-useless-fragment": "off",
"react/jsx-one-expression-per-line": "off",
"react/react-in-jsx-scope": "off",

"import/extensions": ["error", "never", { "svg": "always", "json": "always", "css": "always" }],
"import/prefer-default-export": "off",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"]
}
],
"no-irregular-whitespace": "off",
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["../../"],
"message": "Relative imports are not allowed."
}
]
}
],

"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"]
}
],

"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"object-curly-newline": "off",
"@next/next/no-img-element": "off",
"max-len": "off",
"function-paren-newline": "off",
"operator-linebreak": "off",
"linebreak-style": "off"

},
"ignorePatterns": ["next.config.js", "scripts/**/*.*js"]
"import/no-restricted-paths": [
"error",
{
"zones": [
// separate ui and logic
{ "from": "./constants", "target": "./shared" },
{ "from": "./state", "target": "./shared" },
{ "from": "./components", "target": "./shared" },
{ "from": "./features", "target": "./shared" },
{ "from": "./pages", "target": "./shared" },
{ "from": "./types", "target": "./shared" },
{ "from": "./state", "target": "./components" },
{ "from": "./constants", "target": "./components" },
{ "from": "./features", "target": "./components" }
]
}
]
}
}
74 changes: 37 additions & 37 deletions .github/workflows/vercel-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Vercel Deploy
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
id: extract_branch
run: |
branch_name=${GITHUB_REF#refs/heads/}
branch_formatted=${branch_name//\//-}
echo $branch_name
echo $branch_formatted
echo ::set-output name=branch::$branch_formatted
- name: Checkout Code
uses: actions/checkout@v2
deploy:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
id: extract_branch
run: |
branch_name=${GITHUB_REF#refs/heads/}
branch_formatted=${branch_name//\//-}
echo $branch_name
echo $branch_formatted
echo ::set-output name=branch::$branch_formatted
- name: Checkout Code
uses: actions/checkout@v2

- name: Deploy to Staging
id: deploy-vercel-staging
uses: amondnet/vercel-action@v20
if: github.ref != 'refs/heads/main'
with:
vercel-token: ${{secrets.VERCEL_TOKEN}}
github-token: ${{secrets.VERCEL_GITHUB_TOKEN}}
vercel-org-id: ${{secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{secrets.VERCEL_PROJECT_ID}}
alias-domains: >-
${{ format(
'{0}-{1}.vercel.app',
secrets.VERCEL_DOMAIN,
steps.extract_branch.outputs.branch)
}}
- name: Deploy to Production
id: deploy-vercel-production
uses: amondnet/vercel-action@v20
if: github.ref == 'refs/heads/main'
with:
vercel-token: ${{secrets.VERCEL_TOKEN}}
vercel-org-id: ${{secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{secrets.VERCEL_PROJECT_ID}}
vercel-args: "--prod"
- name: Deploy to Staging
id: deploy-vercel-staging
uses: amondnet/vercel-action@v20
if: github.ref != 'refs/heads/main'
with:
vercel-token: ${{secrets.VERCEL_TOKEN}}
github-token: ${{secrets.VERCEL_GITHUB_TOKEN}}
vercel-org-id: ${{secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{secrets.VERCEL_PROJECT_ID}}
alias-domains: >-
${{ format(
'{0}-{1}.vercel.app',
secrets.VERCEL_DOMAIN,
steps.extract_branch.outputs.branch)
}}
- name: Deploy to Production
id: deploy-vercel-production
uses: amondnet/vercel-action@v20
if: github.ref == 'refs/heads/main'
with:
vercel-token: ${{secrets.VERCEL_TOKEN}}
vercel-org-id: ${{secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{secrets.VERCEL_PROJECT_ID}}
vercel-args: '--prod'
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
{
files: ['*.json', '*.yaml'],
options: {
tabWidth: 2,
tabWidth: 4,
},
},
],
Expand Down
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,33 @@

<img src="https://github.com/ekaterinburgdev/map/assets/22644149/da549cf5-e54b-4984-b763-1d757d711bae" alt="" width="65%">


## About

> 🚧 This is a technical release for collecting feedback, not an analysis tool
The map contains layers of data about objects in the city so that urbanists can easily access them to work with them.

### Features

- Speed and performance map with [Maplibre GL](https://github.com/maplibre/maplibre-gl-js) and [React-mapbox-gl](https://github.com/alex3165/react-mapbox-gl)
- Visualization for [Ekaterinburg opendata](https://github.com/ekaterinburgdev/map-api)
- Detailed object cards
- Speed and performance map with [Maplibre GL](https://github.com/maplibre/maplibre-gl-js) and [React-mapbox-gl](https://github.com/alex3165/react-mapbox-gl)
- Visualization for [Ekaterinburg opendata](https://github.com/ekaterinburgdev/map-api)
- Detailed object cards

## Map data

| Data layer | GeoJSON | Objects | Sources | Auto-update | Status |
|-----------------------------------------|---------|---------|---------|------------|--------|
| Design code objects | ⬇️ [design‑code](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-design-code.json) | | [map.ekaterinburg.design](https://map.ekaterinburg.design) | 🔄 ||
| Traffic collision | ⬇️ [dtp](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-dtp.json) | ⬇️ [dtps](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-dtps.json) | [dtp-stat.ru](https://dtp-stat.ru) | 🔄 ||
| Touristic route (points) | ⬇️ [color-points](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-color-points.json) | | [tourism.ekburg.ru](http://tourism.ekburg.ru) |||
| Touristic route (lines) | ⬇️ [color-lines](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-color-lines.json) | | [ekbredline.ru](http://ekbredline.ru) |||
| Quarter inspectors | ⬇️ [quarter_inspectors](https://github.com/ekaterinburgdev/map/blob/main/public/quarter_inspectors.json) | | [екатеринбург.рф](https://екатеринбург.рф/справка/квартальные) |||
| Cultural heritage sites (objects) | ⬇️ [okn‑objects](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-okn-objects.json) | ⬇️ [okn](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-okn.json) | [okn.midural.ru](https://okn.midural.ru/karta-obektov-kulturnogo-naslediya-sverdlovskoy-oblasti.html) || 🚧 |
| Cultural heritage sites (protect zone) | ⬇️ [okn‑protect](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-okn-protect.json) | | [okn.midural.ru](https://okn.midural.ru/karta-obektov-kulturnogo-naslediya-sverdlovskoy-oblasti.html) || 🚧 |
| Cultural heritage sites (security zone) | ⬇️ [okn‑security](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-okn-security.json) | | [okn.midural.ru](https://okn.midural.ru/karta-obektov-kulturnogo-naslediya-sverdlovskoy-oblasti.html) || 🚧 |
| Houses data | _Not available for download now.<br />We use [these recommendations](https://github.com/kachkaev/tooling-for-how-old-is-this-house#tooling-for-how-old-is-thishouse)_ | | [openstreetmap.org](https://www.openstreetmap.org/)<br />[how-old-is-this.house](https://how-old-is-this.house/)<br />[mingkh.ru](https://mingkh.ru/)<br />[domaekb.ru](https://domaekb.ru) || 🚧 |

- ✅ — Verified source
- 🚧 — Under construction. Contains inaccuracies, be careful!
- 🔄 — [Autoupdate from sources](https://github.com/ekaterinburgdev/map-updater) (**now disabled**)
| Data layer | GeoJSON | Objects | Sources | Auto-update | Status |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------ |
| Design code objects | ⬇️ [design‑code](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-design-code.json) | | [map.ekaterinburg.design](https://map.ekaterinburg.design) | 🔄 | |
| Traffic collision | ⬇️ [dtp](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-dtp.json) | ⬇️ [dtps](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-dtps.json) | [dtp-stat.ru](https://dtp-stat.ru) | 🔄 | |
| Touristic route (points) | ⬇️ [color-points](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-color-points.json) | | [tourism.ekburg.ru](http://tourism.ekburg.ru) | | |
| Touristic route (lines) | ⬇️ [color-lines](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-color-lines.json) | | [ekbredline.ru](http://ekbredline.ru) | | |
| Quarter inspectors | ⬇️ [quarter_inspectors](https://github.com/ekaterinburgdev/map/blob/main/public/quarter_inspectors.json) | | [екатеринбург.рф](https://екатеринбург.рф/справка/квартальные) | | |
| Cultural heritage sites (objects) | ⬇️ [okn‑objects](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-okn-objects.json) | ⬇️ [okn](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-okn.json) | [okn.midural.ru](https://okn.midural.ru/karta-obektov-kulturnogo-naslediya-sverdlovskoy-oblasti.html) | | 🚧 |
| Cultural heritage sites (protect zone) | ⬇️ [okn‑protect](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-okn-protect.json) | | [okn.midural.ru](https://okn.midural.ru/karta-obektov-kulturnogo-naslediya-sverdlovskoy-oblasti.html) | | 🚧 |
| Cultural heritage sites (security zone) | ⬇️ [okn‑security](https://github.com/ekaterinburgdev/map/blob/main/public/ekb-okn-security.json) | | [okn.midural.ru](https://okn.midural.ru/karta-obektov-kulturnogo-naslediya-sverdlovskoy-oblasti.html) | | 🚧 |
| Houses data | _Not available for download now.<br />We use [these recommendations](https://github.com/kachkaev/tooling-for-how-old-is-this-house#tooling-for-how-old-is-thishouse)_ | | [openstreetmap.org](https://www.openstreetmap.org/)<br />[how-old-is-this.house](https://how-old-is-this.house/)<br />[mingkh.ru](https://mingkh.ru/)<br />[domaekb.ru](https://domaekb.ru) | | 🚧 |

- ✅ — Verified source
- 🚧 — Under construction. Contains inaccuracies, be careful!
- 🔄 — [Autoupdate from sources](https://github.com/ekaterinburgdev/map-updater) (**now disabled**)

## Development

Expand All @@ -52,3 +49,7 @@ pnpm i
```
pnpm dev
```

## Activity

![Alt](https://repobeats.axiom.co/api/embed/5c6cd2ad59ea3b7fde917c1aa66a1914235c84af.svg 'Repobeats analytics image')
51 changes: 0 additions & 51 deletions components/App.tsx

This file was deleted.

Loading

1 comment on commit 574446c

@ekbdev
Copy link

@ekbdev ekbdev commented on 574446c Dec 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for map ready!

✅ Preview
https://map-2is40wri9-ekbdev.vercel.app
https://ekbdev-map-url-layer-filter.vercel.app

Built with commit 574446c.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.