This guide will walk you through the process of setting up the nahean.vercel.app portfolio project on your local machine.
Prerequisites
Before you begin, ensure you have the following installed:
1. Clone the Repository
Begin by cloning the project repository to your local machine.
git clone https://github.com/AlNahean/Portfolio-Website.git cd Portfolio-Website
2. Install Dependencies
Once inside the project directory, use pnpm to install all the necessary dependencies.
pnpm install
3. Environment Setup
The project relies on a PostgreSQL database via Prisma, as well as several other configuration variables.
- Create a
.envfile in the root of the project. - You can use the provided
.env.exampleas a template:
cp .env.example .env
- Open
.envand fill in your database connection string and any required API keys.
# Example .env DATABASE_URL="postgresql://user:password@localhost:5432/portfolio?schema=public"
4. Database Setup (Prisma)
With your database URL configured, generate the Prisma client and push the schema to your database.
# Generate the Prisma Client pnpm install prisma pnpm run build
(Note: Because the project uses prisma generate inside its build step, ensuring prisma is configured is essential.)
If you need to push the schema to a fresh database:
npx prisma db push
5. Start the Development Server
Finally, you can start the Next.js development server.
pnpm run dev
The application will now be running at http://localhost:3000.
6. Build the Registry (Optional)
If you plan on modifying or adding components to the shadcn-style registry system, you can build the dynamic registry indices with:
pnpm run build:registry
This ensures that the JSON manifests in /public/r and the component exports in src/registry/components.ts are up to date!