Official website for Cloud Native Bergen and Cloud Native Day Bergen.
To get started with this template, first install the npm dependencies:
npm installNext, run the development server:
npm run devFinally, open http://localhost:3000 in your browser to view the website.
This project uses Turbopack for both development and production builds to ensure consistent CSS generation with Tailwind CSS v4. A known incompatibility exists between Turbopack (used in dev) and Webpack (Vercel's default production bundler) that causes Tailwind classes to be missing in production.
The fix is already in place via experimental.turbo: {} in next.config.ts.
This project includes VS Code workspace settings in .vscode/settings.json that automatically configure:
- Prettier formatting using the project's
prettier.config.jssettings - Format on save for consistent code style
- ESLint integration with auto-fix on save
- Tailwind CSS IntelliSense for better development experience
The project includes recommended VS Code extensions in .vscode/extensions.json:
- Prettier - Code formatter (
esbenp.prettier-vscode) - Tailwind CSS IntelliSense (
bradlc.vscode-tailwindcss) - TypeScript and JavaScript Nightly (
ms-vscode.vscode-typescript-next) - Sanity.io (
sanity-io.vscode-sanity)
VS Code will prompt you to install these extensions when you open the workspace.
The project uses Prettier for code formatting with these settings:
- Single quotes (
') instead of double quotes - No semicolons
- Tailwind CSS class sorting via
prettier-plugin-tailwindcss
To format all files manually:
npm run formatTo check for linting issues:
npm run lintTo run TypeScript type checking:
npm run typecheckInstall the Sanity CLI:
npm install --global sanity@latestDeploy Sanity Studio to Sanity.io
sanity deployModels are defined in lib/<type>/types.ts and in sanity/schemaTypes/<type>.ts for the representation in Sanity Studio.
The project includes migration scripts based on Sanity's migration framework that help update content data when schemas change. Migrations are stored in migrations/.
To create a new migration, use the Sanity CLI command:
npx sanity@latest migration create "Replace event type with event format"Replace the text in quotes with a descriptive title for your migration. This will create a new migration folder with a boilerplate script that you can modify.
Before running any migration, export your dataset as a backup:
# Create a backup of your dataset
npx sanity@latest dataset export production my-backup-filename.tar.gzThis gives you a safety net in case anything goes wrong during the migration.
After making schema changes, validate your documents against the new schema:
# Validate documents against schema changes
npx sanity@latest documents validate -yThis helps identify any potential issues before running the migration.
After creating a backup and validating documents, run the migration:
# Run a migration with Sanity CLI
npx sanity@latest migration run add-required-conference-reference-to-talksWhen prompted, provide your Sanity auth token. The migration will process the documents and report the changes made.
For more details about available migrations and creating new ones, see Sanity Migrations Documentation.
To learn more about Sanity migrations, check out these resources:
Authentication is handled by next-auth. To enable authentication, you need to create a .env.local file in the root of the project and add the following environment variables:
NEXTAUTH_SECRET=YOUR_SECRETTo generate a secret, you can run the following command:
openssl rand -base64 32To add a new provider, you need to add a new provider in the lib/auth.ts file and add the corresponding environment variables to the .env.local file.
You also need to update the app/profile/email/route.ts file to handle the new provider.
AUTH_GITHUB_ID=YOUR_GITHUB_ID
AUTH_GITHUB_SECRET=YOUR_GITHUB_SECRETThe travel support system uses real-time exchange rates for currency conversion. To enable this feature:
-
Get a free API key from ExchangeRate-API.com (1,500 requests/month free)
-
Add to your
.env.localfile:NEXT_PUBLIC_EXCHANGE_RATE_API_KEY=your_api_key_here
If not configured, the system will use fallback exchange rates. See docs/EXCHANGE_RATE_API.md for detailed configuration.
The project uses a two-tier storage architecture for handling proposal attachments (slides, resources):
- Temporary Storage: Vercel Blob (client-side direct upload, bypasses 4.5MB serverless limit)
- Permanent Storage: Sanity CMS (asset management)
Files up to 50MB are supported. See docs/ATTACHMENT_STORAGE.md for detailed architecture documentation.
- Create Vercel Blob store in Vercel Dashboard → Storage → Blob
- Pull environment variables:
npx vercel env pull .env.local BLOB_READ_WRITE_TOKENis automatically created
The system includes automatic cleanup of temporary files via daily cron job.
This project is licensed under the MIT License. See the LICENSE file for more information.
To learn more about the technologies used in this site template, see the following resources:
- Tailwind CSS - the official Tailwind CSS documentation
- Next.js - the official Next.js documentation
- Headless UI - the official Headless UI documentation