{"id":22045779,"url":"https://github.com/abduldevhub/opal-labs-backend","last_synced_at":"2026-04-02T03:04:24.535Z","repository":{"id":230095050,"uuid":"778135174","full_name":"AbdulDevHub/Opal-Labs-Backend","owner":"AbdulDevHub","description":"This is a public and enhanced copy of a private repository in which I worked with a team of 7 people to create a Notion-like productivity website. The project is built using Next.js, TypeScript, Google OAuth, the Agile Model, PostgreSQL, Redis, Playwright, and Go.","archived":false,"fork":false,"pushed_at":"2024-09-07T22:48:02.000Z","size":116,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T16:23:49.973Z","etag":null,"topics":["elephantsql","go","postgresql","postman","redis","render","rest-api","sql"],"latest_commit_sha":null,"homepage":"https://opal-labs-backend-muej.onrender.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbdulDevHub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-27T06:26:42.000Z","updated_at":"2025-02-22T16:57:37.000Z","dependencies_parsed_at":"2024-05-11T05:22:29.983Z","dependency_job_id":"cb12e304-565f-431b-a10a-fe96c25609af","html_url":"https://github.com/AbdulDevHub/Opal-Labs-Backend","commit_stats":null,"previous_names":["abduldevhub/opal-labs-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AbdulDevHub/Opal-Labs-Backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdulDevHub%2FOpal-Labs-Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdulDevHub%2FOpal-Labs-Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdulDevHub%2FOpal-Labs-Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdulDevHub%2FOpal-Labs-Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbdulDevHub","download_url":"https://codeload.github.com/AbdulDevHub/Opal-Labs-Backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdulDevHub%2FOpal-Labs-Backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["elephantsql","go","postgresql","postman","redis","render","rest-api","sql"],"created_at":"2024-11-30T13:15:00.567Z","updated_at":"2026-04-02T03:04:24.523Z","avatar_url":"https://github.com/AbdulDevHub.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 Opal Labs — Backend\n\nBackend services powering the Opal Labs productivity platform.\n\n\u003cimg src=\"Cover Image.jpg\" width=\"65%\" /\u003e\n\n\u003cbr /\u003e\n\n[🖥 Frontend Repository](https://github.com/AbdulDevHub/Opal-Labs-Frontend)\n\n\u003cbr /\u003e\n\n![Go](https://img.shields.io/badge/Go-00ADD8?logo=go\u0026logoColor=white)\n![PostgreSQL](https://img.shields.io/badge/PostgreSQL-316192?logo=postgresql\u0026logoColor=white)\n![Redis](https://img.shields.io/badge/Redis-DC382D?logo=redis\u0026logoColor=white)\n![OAuth](https://img.shields.io/badge/Auth-Google%20OAuth-red)\n![MIT License](https://img.shields.io/badge/License-MIT-green)\n\n\u003c/div\u003e\n\n---\n\n## ✨ Introduction\n\nThis is a **public copy of a private repository** where I collaborated with a **team of 7 developers** to build a Notion-like productivity platform.\n\nThis repository contains the **backend** services for the application.  \nFor the frontend implementation, visit 👉 **[Opal Labs Frontend](https://github.com/AbdulDevHub/Opal-Labs-Frontend)**\n\n### 🧱 Backend Tech Stack\n\n- **Language:** Go\n- **Database:** PostgreSQL\n- **Caching:** Redis\n- **Authentication:** Google OAuth 2.0\n- **Testing:** Go testing framework\n- **Methodology:** Agile\n\n---\n\n## 🛠 Setup\n\n### 🔐 Environment Variables\n\nThe `.env.example` file contains a template for configuration.\n\n```bash\ncp .env.example .env\n````\n\n---\n\n### 🔁 CompileDaemon (Hot Reload)\n\nTo enable hot-reload during development, install **CompileDaemon**:\n\n📦 [https://pkg.go.dev/github.com/githubnemo/compiledaemon](https://pkg.go.dev/github.com/githubnemo/compiledaemon)\n\n---\n\n## 🐘 PostgreSQL Setup\n\n### Local Installation\n\n1. Download PostgreSQL:\n   👉 [https://www.enterprisedb.com/downloads/postgres-postgresql-downloads](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads)\n\n2. During setup:\n\n   - Set password to: `password`\n   - Leave all other options as default\n\n3. Open **pgAdmin4** and create a database named:\n\n   ```text\n   Website\n   ```\n\n---\n\n### ☁️ ElephantSQL (Hosted Option)\n\nIf you prefer not to run PostgreSQL locally:\n\n1. Create an account:\n   👉 [https://customer.elephantsql.com/login](https://customer.elephantsql.com/login)\n\n2. Click **Create New Instance**\n\n3. Select plan: **Tiny Turtle (Free)**\n\nUpdate the following values in your `.env` file:\n\n```bash\nDB_USER=\"\u003cUser \u0026 Default Database\u003e\"\nDB_PASSWORD=\"\u003cPassword\u003e\"\nDB_NAME=\"\u003cUser \u0026 Default Database\u003e\"\nDB_HOST=\"\u003cServer\u003e\"\nDB_PORT=5432\nDB_SSL_MODE=\"disable\"\n```\n\n---\n\n## ⚡ Redis Setup\n\n### Local Installation\n\n1. Download Redis:\n   👉 [https://redis.io/download](https://redis.io/download)\n\n2. Ensure Redis is running on:\n\n   ```text\n   localhost:6379\n   ```\n\n3. Defaults (already set in `.env.example`):\n\n   - Password: `\"\"` (empty)\n   - Database: `0`\n\nIf your setup differs, update:\n\n```env\nREDIS_ADDR\nREDIS_PASSWORD\nREDIS_DB\n```\n\n---\n\n### ☁️ Hosted Redis (RedisLabs)\n\n1. Create an account:\n   👉 [https://redislabs.com/](https://redislabs.com/)\n\n2. Create a **free** Redis database\n\nUpdate your `.env` file:\n\n```bash\nREDIS_ADDR=\"\u003cPublic Endpoint\u003e\"\nREDIS_PASSWORD=\"\u003cDefault User Password\u003e\"\nREDIS_DB=0\n```\n\nℹ️ These values can be found under the **Configuration** tab in RedisLabs.\n\n---\n\n### 📦 Redis Usage Notes\n\n- The backend will still run **without Redis**, but caching will be disabled.\n- Start local Redis:\n\n  ```bash\n  redis-server\n  ```\n\n- Stop Redis:\n\n  ```bash\n  redis-cli shutdown\n  ```\n\n#### Common Redis Commands\n\n- `SET key value`\n- `GET key`\n- `DEL key`\n- `FLUSHALL`\n\n---\n\n## 🔐 Google OAuth 2.0\n\nFollow the setup instructions provided in the team drive:\n\n👉 [https://drive.google.com/drive/folders/1PWzpsJGXIDA_RnRRoEcJe_U5yvGC6s_U?usp=sharing](https://drive.google.com/drive/folders/1PWzpsJGXIDA_RnRRoEcJe_U5yvGC6s_U?usp=sharing)\n\n---\n\n## 🚀 Running the Server\n\n```bash\ngo build\ngo run .\n```\n\n### Hot Reload Mode\n\n```bash\nCompileDaemon -command=\"./backend\"\n```\n\n---\n\n## 🧪 Running Tests\n\nWith the server running, open another terminal:\n\n```bash\ncd tests\ngo test -v\n```\n\nRun a specific test:\n\n```bash\ngo test -run \"test_function_name\"\n```\n\n---\n\n## ☁️ Testing Hosted Backend\n\nReplace:\n\n```text\nlocalhost:8000\n```\n\nWith:\n\n```text\nhttps://opal-labs-backend-muej.onrender.com\n```\n\n### Example\n\n```text\nhttps://opal-labs-backend-muej.onrender.com/page-get/123\n```\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome!\n\n- Open an issue for bugs or feature requests\n- Submit a PR for improvements\n\n---\n\n## 📄 License\n\nThis project is licensed under the **MIT License**.\nSee the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabduldevhub%2Fopal-labs-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabduldevhub%2Fopal-labs-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabduldevhub%2Fopal-labs-backend/lists"}