{"id":44556915,"url":"https://github.com/codedbychavez/grepbase","last_synced_at":"2026-02-13T21:48:22.424Z","repository":{"id":290279782,"uuid":"935100066","full_name":"codedbychavez/grepbase","owner":"codedbychavez","description":"GrepBase is a simple JSON file database with an express backend and a Vue.js frontend. It is handy for adding dummy data to test your apps during development.","archived":false,"fork":false,"pushed_at":"2025-08-17T23:20:44.000Z","size":6854,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-18T01:11:49.082Z","etag":null,"topics":["database","dev","file-database","json-database","media-database","media-storage","nodejs","vuejs"],"latest_commit_sha":null,"homepage":"https://grepbase.com","language":"Vue","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/codedbychavez.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,"zenodo":null}},"created_at":"2025-02-18T22:46:49.000Z","updated_at":"2025-08-17T23:20:48.000Z","dependencies_parsed_at":"2025-04-28T01:32:44.982Z","dependency_job_id":"ddc51ed3-2098-415b-a3a1-52fad353bb49","html_url":"https://github.com/codedbychavez/grepbase","commit_stats":null,"previous_names":["codedbychavez/grepbase"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codedbychavez/grepbase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fgrepbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fgrepbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fgrepbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fgrepbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codedbychavez","download_url":"https://codeload.github.com/codedbychavez/grepbase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fgrepbase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29419425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["database","dev","file-database","json-database","media-database","media-storage","nodejs","vuejs"],"created_at":"2026-02-13T21:48:21.849Z","updated_at":"2026-02-13T21:48:22.412Z","avatar_url":"https://github.com/codedbychavez.png","language":"Vue","readme":"# GrepBase\n\nGrepBase is a simple JSON file database with an express backend and a Vue.js frontend. It is handy for adding dummy data to test your apps during development.\n\nHere is an example of the database file (`backend/data.json`) with data added:\n\n```json\n{\n  \"mystore\": [\n\n ],\n  \"My Favorite Songs\": [\n {\n      \"id\": 1,\n      \"title\": \"Title One\",\n      \"Artist\": \"Some Artist\",\n      \"Genre\": \"Electronic\",\n      \"Year\": 2013,\n      \"Duration\": \"4:07\",\n      \"Album\": \"Another Album\"\n },\n {\n      \"id\": \"2\",\n      \"title\": \"Title Two\",\n      \"Artist\": \"Other Artist\",\n      \"Genre\": \"Rock\",\n      \"Year\": \"2013\",\n      \"Duration\": \"4:24\",\n      \"Album\": \"Next Album\"\n }\n ]\n}\n```\n\nEach key represents a **store**. Every store has a value array containing items (objects). Items added to a store via the API/ Frontend UI is auto assigned a unique ID.\n\n## GrepBase API\n\nThe API provides user authentication, media upload, and JSON-based key-value storage using local files. Below is a list of available API routes grouped by functionality.\n\n### 🔐 Authentication\n\n`GET /check-session`\n\nCheck if a user is currently authenticated.\n\n*Response*:\n\n```json\n200 OK: { user }\n\n401 Unauthorized: { error }\n```\n\n`POST /sign-in`\n\nSign in using a username and password.\n\n*Request body*:\n\n```json\n{\n  \"username\": \"user\",\n  \"password\": \"pass\"\n}\n```\n\n*Response*:\n\n```json\n200 OK: { message, user }\n\n401 Unauthorized: { error }\n```\n\n`GET /sign-out`\n\nSign out the current user.\n\n*Response*:\n\n```json\n200 OK: { message }\n\n401 Unauthorized: { error }\n```\n\n`POST /sign-up`\n\nRegister a new user.\n\n*Request body*:\n\n```json\n{\n  \"username\": \"user\",\n  \"password\": \"pass\"\n}\n```\n\n*Response*:\n\n```json\n200 OK: { message }\n\n409 Conflict: { error }\n\n500 Internal Server Error: { error }\n```\n\n### 🏪 Store Management\n\n`POST /create-store/:storeName`\n\nCreate a new store with the specified name.\n\n*Response*:\n\n```json\n200 OK: { message }\n\n500 Internal Server Error: { error }\n```\n\n`GET /get-stores`\n\nGet the list of all store names.\n\n*Response*:\n\n```json\n200 OK: [ \"store1\", \"store2\" ]\n\n500 Internal Server Error: { error }\n```\n\n`PATCH /rename-store/:oldStoreName/:newStoreName`\n\nRename an existing store.\n\n*Response*:\n\n```json\n200 OK: { message }\n\n500 Internal Server Error: { error }\n```\n\n`DELETE /delete-store/:storeName`\n\nDelete a store by name.\n\n*Response*:\n\n```json\n200 OK: { message }\n\n500 Internal Server Error: { error }\n```\n\n### 📦 Store Item Management\n\n`POST /create-store-item/:storeName`\n\nAdd an item to a store.\nRequest body: JSON object with arbitrary fields. For example:\n\n```json\n{\n  \"id\": \"1\",\n  \"First Name\": \"Joe\",\n  \"Last Name\": \"Fisher\",\n  \"Date of Birth\": \"10th June 2001\",\n  \"Company\": \"Acme Inc.\",\n  \"Salary\": \"75,0000\",\n  \"Date Started\": \"April 03 2023\",\n  \"Date Ended\": \"-\",\n  \"Employee Score\": \"78/100\"\n}\n```\n\n*Response*:\n\n```json\n    201 Created: { message }\n\n    404 Not Found: { error }\n```\n\n`GET /get-store-items/:storeName`\n\nGet items in a store with a mediaType key.\n\n*Response*:\n\n```json\n200 OK: [ item1, item2 ]\n\n404 Not Found: { error }\n```\n\n`PATCH /edit-store-item/:storeName`\n\nEdit a store item (by id).\nRequest body: Full updated item object\n\n*Response*:\n\n```json\n201 Created: { message }\n\n404 Not Found: { error }\n```\n\n`DELETE /delete-store-item/:storeName/:itemId`\n\nDelete an item from a store by ID.\n\n*Response*:\n\n```json\n200 OK: { message }\n\n404 Not Found: { error }\n```\n\n### 🎞 Media Management\n\n`POST /upload-media-item/:storeName`\n\nUpload a media file to a store.\n\nForm Data:\n\n- file: File (required)\n\n- mediaType: string (e.g., \"image\")\n\n*Response*:\n\n```json\n201 Created: { message }\n\n400 Bad Request: { error }\n```\n\n`GET /get-media-items/:storeName/:mediaType`\n\nGet media items by type from a store.\n\n*Response*:\n\n```json\n200 OK: [ mediaItem1, mediaItem2 ]\n\n400 Bad Request: { error }\n```\n\n`DELETE /delete-media-item/:storeName/:mediaId`\n\nDelete a media item by ID and remove the file.\n\n*Response*:\n\n```json\n    200 OK: { message, deletedMedia }\n\n    404 Not Found: { error }\n\n    500 Internal Server Error: { error }\n```\n\n### 🗂 File Hosting\n\n`GET /uploads/:filename`\n\nStatic file serving for uploaded media.\nUsage:\nAccess uploaded files at /uploads/filename.ext\n\n### 🛠 Notes\n\n- Express session uses SQLite for persistence.\n\n- Authentication is handled via Passport.js with a local strategy.\n\n- JSON-based store is saved and read using local file I/O.\n\n## Running Locally\n\n### Frontend\n\n```shell\ncd frontend\n\nnpm run dev\n```\n\n### Backend\n\n```shell\ncd backend\n\nnpm run dev\n```\n\n## Running with Docker\n\n1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/). This will install docker on your system.\n\n2. Follow the instructions below to build and run the backend and frontend containers:\n\n### Backend\n\n```bash\ndocker build --no-cache -t grepbase-backend -f Dockerfile.backend .\n```\n\n```bash\ndocker run -d -p 3000:3000 grepbase-backend\n```\n\n### Frontend\n\n```bash\ndocker build --no-cache -t grepbase-frontend -f Dockerfile.frontend .\n```\n\n```bash\ndocker run -d -p 8080:80 grepbase-frontend\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedbychavez%2Fgrepbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodedbychavez%2Fgrepbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedbychavez%2Fgrepbase/lists"}