Getting started

Installation

Get Fastly running on your local machine

Prerequisites

Before you begin, ensure you have the following installed:

RequirementVersionNotes
Node.js18.17 or higherRequired for Next.js 16
pnpm8.0 or higherRecommended package manager
MongoDB6.0 or higherLocal instance or MongoDB Atlas
Git2.0 or higherFor cloning the repository

MongoDB Atlas offers a free tier that works well for development. Create an account at mongodb.com/atlas.

Installation

Clone the repository

git clone --filter=blob:none --sparse https://github.com/nabinkhair42/fastly.git my-app

Install dependencies

pnpm install
npm install
yarn install

Create environment file

cp env.example .env.local

Open .env.local and configure the required variables. See Environment Setup for details.

Start the development server

pnpm dev
npm run dev
yarn dev

The application will be available at http://localhost:3000.

Verify Installation

After starting the server, verify that everything is working:

URLExpected Result
/Landing page loads
/create-accountRegistration form appears
/log-inLogin form appears

If you see database connection errors, verify your MONGODB_URI is correct and the database is accessible.

Production Build

Build the application

pnpm build
npm run build
yarn build

Start the production server

pnpm start
npm start
yarn start

The production server runs on port 3000 by default. Use the PORT environment variable to change it.

Common Issues

Port already in use

If port 3000 is occupied, specify a different port:

PORT=3001 pnpm dev

Module not found errors

Clear the cache and reinstall dependencies:

rm -rf node_modules .next
pnpm install

TypeScript errors

Ensure you're using the correct Node.js version:

node --version  # Should be 18.17+

Next Steps

Continue to Environment Setup to configure your database, OAuth providers, and email service.

On this page