https://github.com/alexandredresch/portfolio-server
This is the backend for my portfolio, built using NestJS. It provides APIs to manage the projects displayed in the frontend of the portfolio. The backend handles the creation, updating, retrieval, and deletion of projects.
https://github.com/alexandredresch/portfolio-server
class-transformer class-validator nestjs prisma typescript
Last synced: 9 months ago
JSON representation
This is the backend for my portfolio, built using NestJS. It provides APIs to manage the projects displayed in the frontend of the portfolio. The backend handles the creation, updating, retrieval, and deletion of projects.
- Host: GitHub
- URL: https://github.com/alexandredresch/portfolio-server
- Owner: AlexandreDresch
- Created: 2024-03-27T03:02:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-05T03:04:50.000Z (almost 2 years ago)
- Last Synced: 2025-01-08T09:26:08.480Z (over 1 year ago)
- Topics: class-transformer, class-validator, nestjs, prisma, typescript
- Language: TypeScript
- Homepage:
- Size: 111 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Portfolio Backend
### This is the backend for my portfolio, built using NestJS. It provides APIs to manage the projects displayed in the frontend of the portfolio. The backend handles the creation, updating, retrieval, and deletion of projects.
## Features
- **CRUD Operations**: Create, read, update, and delete projects.
- **Validation**: Ensures data integrity using class-validator.
- **Database Integration**: Uses Prisma for database interactions.
## Starting the project
Clone the repository:
```cl
git clone https://github.com/AlexandreDresch/Portfolio-Server.git
```
Go to the project directory:
```cl
cd Portfolio-Server
```
Use **npm install** to install project dependencies.
Populate `.env` file based on `.env.EXAMPLE`.
Then start the project.
```cl
npm run start
```
## API Endpoints
#### Create a Project
- URL: /projects
- Method: POST
- Request Body:
```json
{
"name": "Project Name",
"description": "Project Description",
"done": true,
"images": ["image1.jpg", "image2.jpg"],
"deployment_url": "http://deployment.url",
"github_url": "http://github.url",
"date": "2023-06-22",
"type": "ProjectType"
}
```
#### Get All Projects
- URL: /projects
- Method: GET
- Response:
```json
[
{
"id": 1,
"name": "Project Name",
"description": "Project Description",
"done": true,
"images": ["image1.jpg", "image2.jpg"],
"deployment_url": "http://deployment.url",
"github_url": "http://github.url",
"date": "2023-06-22",
"type": "ProjectType"
}
]
```
#### Get a Project by Name
- URL: /projects/:name
- Method: GET
- Response:
```json
{
"id": 1,
"name": "Project Name",
"description": "Project Description",
"done": true,
"images": ["image1.jpg", "image2.jpg"],
"deployment_url": "http://deployment.url",
"github_url": "http://github.url",
"date": "2023-06-22",
"type": "ProjectType"
}
```
#### Update a Project
- URL: /projects/:id
- Method: PATCH
- Request Body:
```json
{
"name": "Updated Project Name",
"description": "Updated Project Description",
"done": true,
"images": ["image1.jpg", "image2.jpg"],
"deployment_url": "http://updated.deployment.url",
"github_url": "http://updated.github.url",
"date": "2023-06-23",
"type": "UpdatedProjectType"
}
```
#### Delete a Project
- URL: /projects/:id
- Method: DELETE
## Technologies
- [ ] NestJS
- [ ] Typescript
- [ ] Prisma
- [ ] Class Validator
- [ ] Class Transformer