{"id":23206968,"url":"https://github.com/barata-ribeiro/sentinelofliberty","last_synced_at":"2026-04-05T21:04:16.054Z","repository":{"id":268557601,"uuid":"903329074","full_name":"Barata-Ribeiro/SentinelOfLiberty","owner":"Barata-Ribeiro","description":"Remake of the Sentinel of Liberty project, with Java Spring Boot for backend.","archived":false,"fork":false,"pushed_at":"2025-05-21T17:34:44.000Z","size":2493,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T18:46:39.077Z","etag":null,"topics":["authjs","integration-testing","java","java-23","jpa-entities","next-auth","nextjs","nextjs15","react19","spring-boot","spring-boot-3","spring-data-jpa","spring-security-jwt","springboot","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Barata-Ribeiro.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-14T10:19:41.000Z","updated_at":"2025-05-21T17:36:58.000Z","dependencies_parsed_at":"2025-02-01T15:29:12.439Z","dependency_job_id":"bbc37a94-ba25-4f96-b901-1c997f38c889","html_url":"https://github.com/Barata-Ribeiro/SentinelOfLiberty","commit_stats":null,"previous_names":["barata-ribeiro/sentinelofliberty"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Barata-Ribeiro/SentinelOfLiberty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Barata-Ribeiro%2FSentinelOfLiberty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Barata-Ribeiro%2FSentinelOfLiberty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Barata-Ribeiro%2FSentinelOfLiberty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Barata-Ribeiro%2FSentinelOfLiberty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Barata-Ribeiro","download_url":"https://codeload.github.com/Barata-Ribeiro/SentinelOfLiberty/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Barata-Ribeiro%2FSentinelOfLiberty/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264697567,"owners_count":23650955,"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":["authjs","integration-testing","java","java-23","jpa-entities","next-auth","nextjs","nextjs15","react19","spring-boot","spring-boot-3","spring-data-jpa","spring-security-jwt","springboot","tailwindcss","typescript"],"created_at":"2024-12-18T17:16:24.527Z","updated_at":"2025-12-30T22:12:42.319Z","avatar_url":"https://github.com/Barata-Ribeiro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align:center\"\u003e\n    \u003cimg alt=\"The main logo of Sentinel Of Liberty\" width=\"400\" src=\"client/public/sentinel-of-liberty-final.svg\" title=\"Sentinel of Liberty Logo\"/\u003e\n\u003c/div\u003e\n\nSentinel of Liberty is a full‑stack application providing JWT‑based authentication, rich‑text editing, and real‑time communication via WebSockets. Built to be a place where users can suggest news from third-party news providers, and through this list, the interaction between the ecosystem starts. An admin can freely write an article about said proposed suggestions, offering their opinion/alternate view about it. The project can be fully customized to fit your needs.\n\n## Animated Demo\n![SentinelOfLiberty](client/public/screenshot.gif \"Sentinel of Liberty Demo\")\n\n## 📚 Features\n\n- JWT authentication \u0026 authorization (NextAuth on frontend, Spring Security on backend).\n- Rich‑text editor with TipTap (images, links, alignment, history).\n- Real‑time updates via WebSockets and STOMP for notifications.\n- API documentation with Swagger/OpenAPI.\n- Persistence with JPA/Hibernate (H2 for dev/test, PostgreSQL for production).\n- Data validation with Bean Validation.\n\n## 🚀 Built With\n\n### Frontend\n\nThe frontend of MediManage is built using modern technologies to ensure a responsive and seamless user experience.\n\n- **Next.js 15**: A React framework for server-rendered applications.\n- **React 19 + TypeScript**: A JavaScript library for building user interfaces.\n- **Tailwind CSS**: A utility-first CSS framework for rapid UI development.\n- **NextAuth**: Authentication for Next.js applications.\n- **TipTap**: A highly customizable rich text editor built on ProseMirror, offering an intuitive editing experience.\n- **STOMP.js**: A lightweight JavaScript client for STOMP messaging over WebSockets, enabling real‑time communication.\n\n### Backend\n\nThe backend leverages the power of Spring Boot to provide a scalable and secure foundation for the application.\n\n- **Spring Boot 3.5 \\+ Java 23**: Provides a modern, robust framework and leverages the latest Java features for \n  efficient application development.\n- **Spring Security**: Implements customizable security measures for authentication and authorization.\n- **Spring Data JPA \\(Hibernate\\)**: Simplifies database interactions by mapping Java objects to relational data using Hibernate as the JPA provider.\n- **Hibernate Search (Elasticsearch backend)**: Full-text search capabilities integrated with Hibernate ORM, using Elasticsearch as the search engine.\n- **WebSockets \\\u0026 STOMP**: Enables real-time, bidirectional communication between the client and server using the STOMP protocol over WebSockets.\n- **H2 \\\u0026 PostgreSQL**: Uses H2 for in-memory test environments and PostgreSQL for dev/production-grade persistence.\n- **Swagger\\/OpenAPI \\(springdoc\\-openapi\\)**: Automatically generates interactive API documentation, easing API consumption and testing.\n- **ModelMapper, Lombok**: Reduces boilerplate with efficient object mappings and code generation through annotations.\n\n## 🛠️ Project Setup\n\n### Prerequisites \u0026 verification (Windows cmd.exe)\n\nBefore you start, verify the tools required to run the frontend and backend. The commands below are written for Windows `cmd.exe`. If you use PowerShell or a Unix shell, replace `\\` with `/` and execute the appropriate wrapper (for example `./mvnw` on macOS/Linux).\n\nMinimum recommended versions (project was developed with these):\n- Java 23 (required to build/run the backend)\n- Node.js 20+ (Next.js requires a modern Node)\n- pnpm (used to install frontend deps)\n- Docker \u0026 Docker Compose (or Docker Desktop)\n- Git\n\nVerification commands (run in `cmd.exe`) and expected results:\n\n- Java (runtime and compiler):\n  ```bat\n  java -version\n  javac -version\n  ```\n  Expected: shows Java 23 (or compatible JDK). If `java` or `javac` is not found, install a JDK (Adoptium/Temurin, \n  Oracle, or OpenJDK) and ensure JAVA_HOME is set.\n\n- Maven wrapper (optional if you prefer system Maven):\n  ```bat\n  .\\mvnw.cmd -v\n  ```\n  The project ships a Maven wrapper (`mvnw.cmd`) so you do not need Maven installed globally. Running the wrapper prints the Maven version used.\n\n- Docker and Docker Compose (verify containers):\n  ```bat\n  docker --version\n  docker compose version\n  docker ps\n  ```\n  Expected: Docker running and `docker ps` lists active containers. On Windows, Docker Desktop with WSL2 is recommended.\n\n- Node / npm / pnpm:\n  ```bat\n  node -v\n  npm -v\n  pnpm -v\n  ```\n  If `pnpm` is missing, install it with:\n  ```bat\n  npm install -g pnpm\n  ```\n\n- Git:\n  ```bat\n  git --version\n  ```\n\nQuick diagnostic (copy and paste into `cmd.exe` to run basic checks):\n\n```bat\njava -version\njavac -version\n.\\mvnw.cmd -v\nnode -v\nnpm -v\npnpm -v || echo pnpm not found\ndocker --version\ndocker compose version\ndocker ps\ngit --version\n```\n\nCommon troubleshooting tips\n- Java errors: make sure JAVA_HOME points to a JDK installation and that `java`/`javac` are on PATH. On Windows you can set JAVA_HOME in System Properties → Environment Variables.\n- mvnw permission or execution problems: use `mvnw.cmd` on Windows (`.\\mvnw.cmd spring-boot:run`). On Unix/macOS use `./mvnw spring-boot:run`.\n- Docker on Windows: install Docker Desktop and enable WSL2 backend. Ensure the Docker service is running and you have sufficient permissions.\n- Port conflicts: default ports are 3000 (frontend), 8080 (backend), 5432 (Postgres), 9200 (ElasticSearch). If any \n  port is busy, stop the occupying service or change the port in the corresponding config.\n- pnpm / Node problems: ensure Node and pnpm are compatible with the Next.js version used. If builds fail, try clearing pnpm cache (`pnpm store prune`) and reinstalling (`pnpm install`).\n\n1. **Clone repository**\n   ```shell\n   git clone https://github.com/Barata-Ribeiro/SentinelOfLiberty.git\n   cd SentinelOfLiberty\n   ```\n\n2. **Environment variables**\n   - Frontend: copy `client/.env.example` to `client/.env.local` and fill in:\n     ```dotenv\n     NEXT_PUBLIC_AUTH_TOKEN_NAME=\"TOKEN_NAME\"\n     AUTH_SECRET=AUTO_GEN_AUTH_JS_KEY\n     AUTH_URL=\"http://localhost:3000/api/auth\"\n     AUTH_TRUST_HOST=\"true\"\n     NEXT_PUBLIC_BASE_URL=\"http://localhost:3000\"\n     NEXT_PUBLIC_BACKEND_ORIGIN=\"http://localhost:8080\"\n     ```\n   - Backend: choose profile and copy corresponding file to `src/main/resources/application.properties`. Or use IDE\n     to set up current profile and run the application using the required variables from each application.properties\n     files.\n\n3. **Using Docker \u0026 Docker Compose**\n   - **Build \u0026 run all services**\n     ```shell\n     docker compose -f compose.yaml up --build\n     ```\n     This command uses your `Dockerfile` multi‑stage build to produce a lean runtime image, then starts both the API and a PostgreSQL database via Compose citeturn0search0turn0search1.\n   - **Access services**\n     - Frontend: http://localhost:3000\n     - API (Swagger UI): http://localhost:8080/api-docs\n     - PostgreSQL: host `localhost:5432`, DB `sentinel-of-liberty_db`, user `postgres`, password `postgres`.\n\n4. **Local development (without Docker)**\n   - **Frontend**\n     ```shell\n     cd client\n     npm install\n     npm run dev\n     ```\n   - **Backend**\n     ```shell\n     cd server\n     ./mvnw spring-boot:run\n     ```\n\n## 🗂️ Folder Structure\n\n```\n.\n├── client\n│   ├── node_modules\n│   ├── public\n│   ├── src\n│   │   ├── @types\n│   │   ├── actions\n│   │   ├── app\n│   │   ├── components\n│   │   ├── helpers\n│   │   ├── providers\n│   │   ├── utils\n│   │   ├── auth.ts\n│   │   └── middleware.ts\n│   ├── .env.local\n│   ├── .gitignore\n│   ├── .prettierignore\n│   ├── .prettierrc\n│   ├── eslint.config.mjs\n│   ├── next.config.ts\n│   ├── next-env.d.ts\n│   ├── package.json\n│   ├── package-lock.json\n│   ├── postcss.config.mjs\n│   ├── tailwind.config.ts\n│   └── tsconfig.json\n└── server\n    ├── .mvn\n    ├── src\n    │   ├── main\n    │   │   └── java/com/barataribeiro/sentinelofliberty\n    │   │       ├── builders\n    │   │       ├── config\n    │   │       ├── controllers\n    │   │       ├── dtos\n    │   │       ├── exceptions\n    │   │       ├── models\n    │   │       ├── repositories\n    │   │       ├── services\n    │   │       ├── utils\n    │   │       └── ServerApplication.java\n    │   └── test\n    │       └── java/com/barataribeiro/sentinelofliberty\n    │           ├── config/security\n    │           ├── controllers\n    │           ├── utils\n    │           └── utilsTests\n    ├── target\n    ├── .gitattributes\n    ├── .gitignore\n    ├── compose.yaml\n    ├── Dockerfile\n    ├── HELP.md\n    ├── mvnw\n    ├── mvnw.cmd\n    ├── pom.xml\n    └── sentinel-of-liberty.iml\n```\n\n## 🤝 Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/Barata-Ribeiro/SentinelOfLiberty/issues) if you want to contribute.\n\n## 📜 License\n\nThis project is free software available under the [GPLv3](LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarata-ribeiro%2Fsentinelofliberty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarata-ribeiro%2Fsentinelofliberty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarata-ribeiro%2Fsentinelofliberty/lists"}