This is the backend service for a portfolio website, built with the PERN stack (PostgreSQL, Express.js, React, Node.js) and Prisma ORM.
- User authentication and authorization
- CRUD operations for portfolio projects
- Integration with PostgreSQL using Prisma ORM
- RESTful API architecture
Ensure you have the following installed on your machine:
- Node.js
- npm or yarn
- PostgreSQL
- Clone the repository:
git clone https://github.com/ibrahimozkn/portfolio-backend.git
cd portfolio-backend
- Install the dependencies:
npm install
or
yarn install
- 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"
- Migrate the database schema:
npx prisma migrate dev --name init
- Start the development server:
npm run dev
or
yarn dev
- The server should now be running on
http:https://localhost:3000\
.
The database schema for this project is shown below:
.
├── 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
Contributions are welcome! Please open an issue or submit a pull request for any changes.
This project is licensed under the MIT License.