[go: up one dir, main page]

Skip to content

abwashere/boxing-club

Repository files navigation

VBC - Villejuif Boxing Club

This app was meant to make a better version of my boxing club website, but also for learning purposes (use SSG, CMS, TS, tailwind...).

This is a Next.js project bootstrapped with create-next-app.


Getting Started

First, install the app dependencies:

npm install

Then, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

The app folder has 2 subfolders : (user) and (admin)

  • (user) contains all the app pages/routes
  • (admin) contains the Sanity studio page

Content management

You need a Sanity account to use this feature

Open http://localhost:3000/studio/desk with your browser to access Sanity studio (content manager).

Sanity also provides a preview mode.

  1. To enable it, you need to make an API call to http://localhost:3000/api/preview

  2. To see the app preview, go to http://localhost:3000

  3. To exit: http://localhost:3000/api/exit-preview

In production, replace host url with vbc-abwashere.vercel.app.


Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

First, install the vercel CLI globally, if needed:

npm install -g vercel

Then, run the build command:

vercel

If automatic deployment is enabled:

git push origin main # will automatically deploy in Preview

To deploy to prod, create a PR or rebase and push in local.