Giter Club home page Giter Club logo

oscillation-next-js's Introduction

typescript next.js starter kit for leaflet-react

An extensible next.js starter kit for the leaflet-react map plugin. Template visually enhanced by tailwind and lucide icons. โœจ Setup with typescript ๐Ÿ‘.

Packed with useful components and hooks for using the map and create UI elements for your next(.js) big mapping project.

Wanna instead use the crazy fast Maplibre GL JS?: Here's my maplibre next.js ts starter kit

Table of Contents

  1. Features
  2. Getting started
    1. Clone & Deploy with Github and Vercel
    2. Manual install
  3. Start up
  4. Coming up (probably)
  5. Dependencies
  6. Removing linting rules
  7. No typescript?

๐ŸŽ‡ Features

  • ๐Ÿ‡ mighty next.js 13 leaflet-react no-ssr setup
  • ๐Ÿ˜ typescript + strict lint setup
  • ๐Ÿ”— next.js ready route nav module
  • ๐ŸŒค modular demo content
  • ๐Ÿ› custom marker icons
  • ๐Ÿ“š marker categories
  • ๐Ÿซง marker cluster by category with matching icon+color and notification bubble with marker count
  • โš“๏ธ custom hooks for getting marker data and map context (thx Flo301)
  • ๐Ÿก custom ui components (locate me, center on markers)

๐ŸŽ Getting Started

โ›ด Clone & Deploy with Github and Vercel

Create new Github repo with vercel and deploy it within minutes. Could not be easier as hitting some buttons. Shipping of private repos is possible.

Deploy with Vercel

Later: Check out your repo locally and run npm install or yarn in root

Follow Instructions for Starting Up

โš™๏ธ Manual install

git clone https://github.com/richard-unterberg/next-leaflet-starter-typescript
# then
npm install
# or
yarn

๐Ÿ๏ธ Start up

According the official Next.js Docs:

Run the development server:

npm run dev
# or
yarn dev

Building with type checking and linting

npm run build
# or
yarn build

Start build locally

npm run start
# or
yarn start

๐Ÿ“Š Upcoming (probably)

  • redesign zoom in / zoom out
  • atom components for map ui
  • fix error when setting new coordinates in hot reload "Map container is already initialized."
  • breakpoint hook synced with tailwind breakpoint which is usable in js
  • multiple map instances per page
    • not possible atm since we read the map instance directly from window object ๐Ÿคซ
  • add axios for fetching data
    • move simulated "endpoint" (Places) to public folder and convert to JSON
  • Feel free to contribute! ๐Ÿค—

๐Ÿ“ฆ All them dependencies

"next": "^13.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-leaflet": "^4.2.1",
"@react-leaflet/core": "^2.1.0",
"leaflet": "^1.9.3",
"leaflet.markercluster": "^1.5.3",
"react-resize-detector": "^8.0.4",
"tailwindcss": "^3.2.6"
"lucide-react": "^0.121.0",

See package.json for more details and devDependencies.

๐Ÿคฏ How to remove those linting rules?

You can adjust the settings mainly in eslint.json and tsconfig.json.

I've been using them a lot on my dayjob so I can't be anymore without them.

๐Ÿ“ Don't wanna use typscript at all?

See this nice javascript implementation - This repo is heavily inspired by this one: https://github.com/colbyfayock/next-leaflet-starter

Happy coding! โœŒ๏ธ๐Ÿ‘ฝ

oscillation-next-js's People

Contributors

richard-unterberg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.