Next.js Conference Boilerplate
Intergalactic Conference boilerplate provides an easy starting point for building a conference website with Crystallize and Next.js. You can also check out the live demo of this boilerplate.
To create a new project, we'll use the Crystallize CLI. In your terminal, type in the following command:
npx @crystallize/cli <your-project-name>
Running this command will allow you to add in the following:
- The preferred boilerplate, ‘Next.js - Conference’ in this case.
- The tenant: you can either enter your own tenant or go with the demo tenant to test everything out.
- Example data: if you would like your tenant to have the same data as the boilerplate, please select ‘Yes.’
Once the development server is running, you will be able to browse to http://localhost:3000.
This section provides you with a better understanding of the folder structure.
Contains all the components used throughout the application
A single file containing the details of the locale
Includes the GraphQL queries used to fetch data from Crystallize
This folder includes two other folders - components and theme. The former includes the styling for reusable components such as buttons while the latter has information related to the theme such as colors, sizes, assets, etc.
Has all the individual pages the website contains
This folder contains all the queries related to the service-api
Reusable components can be edited by heading over to the components folder in the design-system. Whereas components such as the footer, the header, the ones used on different pages of the website are to be edited in the src/components folder.
The frontpage is divided into multiple sections which are as follows:
- Hero - this is the uppermost section and can be edited by heading over to the frontpage-hero component
- Sponsors - this is the section titled “Main sponsors”. To edit this, head over to the sponsors component
- USP - the section that contains the marketing information can be edited in the frontpage-body component
- Speakers - Next up is the speaker section that contains a list of speakers. This can be edited in the speaker-section. Individual speakers can be edited by editing the speaker component
- Schedule - This section can be edit by heading over to the schedule component. The component also contains a filter if you have a multi day conference. In order for the filter to work, you will need to edit the dates in this file. Individual talks can be then edited in the talk component
- Job-board - editable in the job-board component
- Partners & Sponsors - the final section contains a list of partners and sponsors. To edit this, head over to the partners component
The merch store consists of a list of products and then individual product pages. To edit the cumulative list of products, head over to the products component whereas individual products can be edited in the product component.
Cart and Checkout
The cart and the checkout pages can be edited in their respective files located in the pages folder.
Lastly, the page shown once the order is confirmed can be edited by heading over to src/checkout/confirmation.
There are two ways to deploy your project to Netlify. You can use GitHub integration by following the Netlify integration guide provided by GitHub or you can do it using the CLI. To deploy using the CLI, make sure to install Netlify-cli:
npm install -g netlify-cli
Once that is installed, log in to Netlify by typing the following command. This redirects you to Netlify where you will be asked to log in.
After logging in, navigate to the root directory and initialize a new Netlify site:
- Select the ‘create and configure a new site’ option
- Choose your team
- The next step is to give your website a name, this is optional and can be changed later If no answer is provided, Netlify generates a random one
- Then, you will be asked to provide access to the GitHub account
- The build command can be set to ‘next build’
- Specify the directory you would like to deploy, in our case, it is the .next directory
- Lastly, you can specify the folder containing the Netlify function. Considering there is no folder for those at present, we can leave it blank
There are two environment variables you need to set:
We recommend that you set these using the Netlify dashboard. However, these can also be set in the netlify.toml file along with build settings and deploy settings.
There are two ways of deploying to Vercel. The easiest is through the Vercel Github integration. Follow that guide to get automatic deployments for each git push. Alternatively, you can also deploy manually from the command line. In order to enable that you need to install Vercel and log in via the CLI:
There are two environment variables you need to set:
We recommend that you set these using the Vercel dashboard.
Deploying your Crystallize project with Vercel is easy. If you have used the GitHub integration, you simply push to GitHub and that’s it. The deployment will be initiated.
If you want to do it with the CLI, you execute a deployment with this command:
This will build the website and deploy it to Vercel. The terminal will say whether the deployment was successful or not. If it has succeeded, you will be given a URL where your site has been deployed.
If you are deploying to production, you can also use the following command to deploy your website to a production domain if you have configured one for your project within the dashboard of Vercel: