{"id":26033276,"url":"https://github.com/juliusmarkwei/bookmark-server","last_synced_at":"2026-05-06T15:44:30.157Z","repository":{"id":280996345,"uuid":"936341947","full_name":"juliusmarkwei/bookmark-server","owner":"juliusmarkwei","description":"Bookmark API built with NestJS and Prisma","archived":false,"fork":false,"pushed_at":"2025-03-06T11:52:40.000Z","size":559,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T12:34:24.147Z","etag":null,"topics":["api","backend","nestjs","nodejs","orm","prisma","restful-api"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juliusmarkwei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-20T23:21:27.000Z","updated_at":"2025-03-06T11:52:44.000Z","dependencies_parsed_at":"2025-03-06T12:45:54.399Z","dependency_job_id":null,"html_url":"https://github.com/juliusmarkwei/bookmark-server","commit_stats":null,"previous_names":["juliusmarkwei/bookmark-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliusmarkwei%2Fbookmark-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliusmarkwei%2Fbookmark-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliusmarkwei%2Fbookmark-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliusmarkwei%2Fbookmark-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliusmarkwei","download_url":"https://codeload.github.com/juliusmarkwei/bookmark-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242309919,"owners_count":20106737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","backend","nestjs","nodejs","orm","prisma","restful-api"],"created_at":"2025-03-07T00:39:02.273Z","updated_at":"2026-05-06T15:44:30.128Z","avatar_url":"https://github.com/juliusmarkwei.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bookmark API\n\nThis is a Bookmark API built with NestJS and Prisma. The API allows users to create, update, delete, and fetch bookmarks. It also includes authentication using JWT.\n\n## Table of Contents\n\n- [Bookmark API](#bookmark-api)\n  - [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n  - [Running the Application](#running-the-application)\n  - [API Endpoints](#api-endpoints)\n    - [Auth](#auth)\n    - [Bookmarks](#bookmarks)\n  - [Environment Variables](#environment-variables)\n  - [Prisma Schema](#prisma-schema)\n  - [License](#license)\n\n## Installation\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/your-username/bookmark-api.git\n    cd bookmark-api\n    ```\n\n2. Install dependencies:\n    ```bash\n    npm install\n    ```\n\n3. Set up the environment variables. Create a `.env` file in the root directory and add the following:\n    ```env\n    DATABASE_URL=your_database_url\n    JWT_SECRET=your_jwt_secret\n    ```\n\n4. Generate Prisma client:\n    ```bash\n    npx prisma generate\n    ```\n\n5. Run database migrations:\n    ```bash\n    npx prisma migrate dev\n    ```\n\n## Running the Application\n\nTo start the application, run:\n```bash\nnpm run start:dev\n```\n\nThe API will be available at `http://localhost:3000`.\n\n## API Endpoints\n\n### Auth\n\n- **POST /auth/signup**: Register a new user.\n    - Request Body:\n        ```json\n        {\n            \"email\": \"user@example.com\",\n            \"password\": \"password\",\n            \"fullName\": \"User Name\"\n        }\n        ```\n\n- **POST /auth/login**: Login a user.\n    - Request Body:\n        ```json\n        {\n            \"email\": \"user@example.com\",\n            \"password\": \"password\"\n        }\n        ```\n\n### Bookmarks\n\n- **GET /bookmarks**: Fetch all bookmarks for the authenticated user.\n    - Headers:\n        ```json\n        {\n            \"Authorization\": \"Bearer \u003ctoken\u003e\"\n        }\n        ```\n\n- **POST /bookmarks**: Create a new bookmark.\n    - Headers:\n        ```json\n        {\n            \"Authorization\": \"Bearer \u003ctoken\u003e\"\n        }\n        ```\n    - Request Body:\n        ```json\n        {\n            \"title\": \"Bookmark Title\",\n            \"description\": \"Bookmark Description\",\n            \"link\": \"https://example.com\"\n        }\n        ```\n\n- **PATCH /bookmarks/:bookmarkId**: Update a bookmark.\n    - Headers:\n        ```json\n        {\n            \"Authorization\": \"Bearer \u003ctoken\u003e\"\n        }\n        ```\n    - Request Body:\n        ```json\n        {\n            \"title\": \"Updated Title\",\n            \"description\": \"Updated Description\",\n            \"link\": \"https://updated-link.com\"\n        }\n        ```\n\n- **DELETE /bookmarks/:bookmarkId**: Delete a bookmark.\n    - Headers:\n        ```json\n        {\n            \"Authorization\": \"Bearer \u003ctoken\u003e\"\n        }\n        ```\n\n## Environment Variables\n\n- `DATABASE_URL`: The URL of the PostgreSQL database.\n- `JWT_SECRET`: The secret key used for signing JWT tokens.\n\n## Prisma Schema\n\nThe Prisma schema defines the database models for the application.\n\n```prisma\ngenerator client {\n  provider = \"prisma-client-js\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  url      = env(\"DATABASE_URL\")\n}\n\nmodel User {\n  id        String     @id @default(uuid())\n  email     String     @unique\n  password  String\n  createdAt DateTime   @default(now())\n  updatedAt DateTime   @updatedAt\n  fullName  String\n  bookmarks Bookmark[]\n}\n\nmodel Bookmark {\n  id          String   @id @default(uuid())\n  userId      String\n  title       String\n  description String?\n  link        String\n  createdAt   DateTime @default(now())\n  updatedAt   DateTime @updatedAt\n  user        User     @relation(fields: [userId], references: [id])\n\n  @@unique([userId, link])\n}\n```\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliusmarkwei%2Fbookmark-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliusmarkwei%2Fbookmark-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliusmarkwei%2Fbookmark-server/lists"}