Giter Club home page Giter Club logo

eva's Introduction

Logo

Uses ๐Ÿ’ฏ

Features โš“

  • Performant by default
  • SEO
  • Internationalization
  • Responsive
  • Dark Mode Support

Local Development โšก

Sanity (Back End)

sanity start in the /studio folder to start the studio locally

Next (Front End)

yarn dev in the project folder to start the front end locally


1) Sanity

  • If you don't have the Sanity CLI installed, first run yarn global add @sanity/cli to install it globally
  • yarn install && sanity init in the /studio folder
  • During Sanity's init it will warn you, type Y and hit enter:
? The current folder contains a configured Sanity studio. Would you like to reconfigure it? (Y/n)
  • When it asks you what dataset configuration to use, go with the default
  • Add CORS Origins to your newly created Sanity project (visit: manage.sanity.io and go to Settings > API): - Add your Studio URLs with credentials: http://localhost:3333 and [subdomain].sanity.studio - Add your front-end URLs without credentials: http://localhost:3000 and https://[subdomain].vercel.app

2) NextJS

  1. yarn install in the project root folder on local
  2. Create an .env.local file in the project folder, and add the following variables:
  3. Update all the XXXXXX values, here's where to find each:
NEXT_PUBLIC_SANITY_DATASET=production

NEXT_PUBLIC_SANITY_PROJECT_ID=XXXXXX

SANITY_API_TOKEN=XXXXXX
  • NEXT_PUBLIC_SANITY_PROJECT_ID - You can grab this after you've init Sanity, either from the studio/sanity.json file, or from your Sanity Manage dashboard

  • SANITY_API_TOKEN - Generate an API token for your Sanity project. Access your project from the Sanity Manage dashboard, and navigate to: "Settings" -> "API" -> "Add New Token" button. Make sure you give read + write access!


.
โ”œโ”€โ”€ README.md                       # README file
โ”œโ”€โ”€ .github                         # GitHub folder
โ”œโ”€โ”€ .husky                          # Husky configuration
โ”œโ”€โ”€ .vscode                         # VSCode configuration
โ”œโ”€โ”€ public                          # Public assets folder
โ”œโ”€โ”€ studio                          # Sanity
โ”œโ”€โ”€ src                             # Source
โ”‚   โ”œโ”€โ”€ utils                       # Configs and scripts
โ”‚   โ”œโ”€โ”€ pages                       # Next JS Pages
โ”‚   โ”œโ”€โ”€ typings                     # Types
โ”‚   โ”œโ”€โ”€ styles                      # Styles folder
โ”‚   โ”œโ”€โ”€ messages                    # i18n translates
โ”‚   โ””โ”€โ”€ components                  # Components
โ”œโ”€โ”€ tailwind.config.js              # Tailwind CSS configuration
โ””โ”€โ”€ tsconfig.json                   # TypeScript configuration

3) Deploy to Vercel ๐Ÿš€

Deploy with Vercel

This is setup to work seamlessly with Vercel, which I highly recommend as your hosting provider of choice. Simply follow the on-screen instructions to setup your new project, and be sure to add the same .env.local variables to your Vercel Project You can see the results locally in production mode with:

yarn build

You can create an optimized production build with:

yarn build-prod

Now, your site is ready to be deployed. All generated files are located at out folder, which you can deploy with any hosting service.

License ๐Ÿค

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.