Skip to content

ibrahimozkn/portfolio-backend

Repository files navigation

Portfolio Backend using PERN + Prisma ORM

This is the backend service for a portfolio website, built with the PERN stack (PostgreSQL, Express.js, React, Node.js) and Prisma ORM.

Table of Contents

Features

  • User authentication and authorization
  • CRUD operations for portfolio projects
  • Integration with PostgreSQL using Prisma ORM
  • RESTful API architecture

Getting Started

Prerequisites

Ensure you have the following installed on your machine:

  • Node.js
  • npm or yarn
  • PostgreSQL

Installation

  1. Clone the repository:
git clone https://github.com/ibrahimozkn/portfolio-backend.git
cd portfolio-backend
  1. Install the dependencies:
npm install

or

yarn install

Database Setup

  1. Create a `.env` file in the root of the project and add your database connection string:
DATABASE_URL="postgresql:https://<user>:<password>@<host>:<port>/<database>?schema=public"
  1. Migrate the database schema:
npx prisma migrate dev --name init

Running the Application

  1. Start the development server:
npm run dev

or

yarn dev
  1. The server should now be running on http:https://localhost:3000\.

Database Schema

The database schema for this project is shown below:

Database Schema

Project Structure

.
├── controllers       # Contains the request handlers for the API
├── helpers           # Utility functions and middlewares
├── prisma            # Prisma schema and migration files
├── routes            # API routes
├── services          # Business logic for different features
├── index.ts          # Entry point of the application
├── package.json      # Project metadata and dependencies
├── tsconfig.json     # TypeScript configuration
└── .gitignore        # Files and directories to be ignored by git

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published