{"id":19884638,"url":"https://github.com/longwater1234/wedemyserver","last_synced_at":"2025-05-02T15:31:08.251Z","repository":{"id":44460911,"uuid":"374237702","full_name":"Longwater1234/WedemyServer","owner":"Longwater1234","description":"Udemy Clone. (Backend) Springboot 3, Java, Spring Session, Braintree Payments, PayPal, MySQL 8, Hibernate, Redis, Google OAuth","archived":false,"fork":false,"pushed_at":"2025-04-29T10:26:36.000Z","size":1929,"stargazers_count":31,"open_issues_count":1,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-29T11:30:35.962Z","etag":null,"topics":["braintree","e-learning","google-sign-in","hibernate","java","mysql","paypal","redis-cache","spring-boot","springsecurity","udemy"],"latest_commit_sha":null,"homepage":"https://longwater1234.github.io/WedemyServer/","language":"Java","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/Longwater1234.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":"2021-06-06T00:32:22.000Z","updated_at":"2025-04-29T10:26:33.000Z","dependencies_parsed_at":"2023-02-14T00:46:10.400Z","dependency_job_id":"dca5fc62-ae20-46e6-9f4c-f6867251a608","html_url":"https://github.com/Longwater1234/WedemyServer","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Longwater1234%2FWedemyServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Longwater1234%2FWedemyServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Longwater1234%2FWedemyServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Longwater1234%2FWedemyServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Longwater1234","download_url":"https://codeload.github.com/Longwater1234/WedemyServer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252062764,"owners_count":21688595,"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":["braintree","e-learning","google-sign-in","hibernate","java","mysql","paypal","redis-cache","spring-boot","springsecurity","udemy"],"created_at":"2024-11-12T17:28:27.655Z","updated_at":"2025-05-02T15:31:08.242Z","avatar_url":"https://github.com/Longwater1234.png","language":"Java","funding_links":["https://developer.paypal.com/braintree/docs"],"categories":[],"sub_categories":[],"readme":"# WedemyServer\n\n[![Static Badge](https://img.shields.io/badge/API_docs-v2.5-blue)](https://longwater1234.github.io/WedemyServer/)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/Longwater1234/WedemyServer/graphs/commit-activity)\n[![License: MIT](https://img.shields.io/github/license/Longwater1234/WedemyServer)](https://github.com/Longwater1234/WedemyServer/blob/master/LICENSE)\n[![Static Badge](https://img.shields.io/badge/reference-help.md-orange)](HELP.md)\n\n(Backend repo). Clone of Udemy, an e-learning platform, built using SpringBoot 3 + Vue 3 + Typescript. With CreditCard\nand\nPayPal checkout (both powered by **Braintree Payments**). Uses Spring Security \u0026 Spring Session Redis (via cookies[^1]\nor sessionID Headers) for auth, instead of stateless JWT Tokens. CSRF protection is enabled. You can easily customize\nthese settings in [SecurityConfig](src/main/java/com/davistiba/wedemyserver/config/SecurityConfig.java). By default, the\napp runs on port 9000.\n\n## Frontend \u0026 Live Demo\n\nClick to view [Frontend Repo](https://github.com/Longwater1234/WedemyClient) and live Demo built using Vue 3, Vite and\nTypescript. However, you may use any other frontend stack with this project. See\nthe [OpenAPI Docs](https://longwater1234.github.io/WedemyServer/) for this project.\n\n## Requirements\n\n- Java 17 or newer\n- MySQL 8.0.x or newer\n- Redis Server (latest stable)\n- [Google OAuth Credentials](https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid) (for Google\n  Login)\n- [Braintree Developer](https://developer.paypal.com/braintree/docs) Account + API Keys. (for Payments)\n- (OPTIONAL) Free PayPal Business Account.\n\n### Environmental Variables\n\nYou MUST set these variables on your Local or Cloud ENV before you launch this SpringBoot app. **💡TIP**: During\ndev/test, you can pass them via `args`, OR store inside your IDE: e.g. In either Eclipse or IntelliJ IDE, in the top\ntoolbar, find the **\"Run\"** menu \u003e **Edit/Run Configuration** \u003e **Environment** \u003e **Environmental Variables**. Add (+)\neach key and its value, then click **Apply**. If using Docker CLI, please follow this quick\n[official guide.](https://docs.docker.com/engine/reference/commandline/run/#env)\n\n```properties\nMYSQL_PASSWORD=\n# below are for Google OAuth\nGOOGLE_CLIENT_ID=\nGOOGLE_CLIENT_SECRET=\n# below are for Braintree Payments\nBT_MERCHANT_ID=\nBT_PUBLIC_KEY=\nBT_PRIVATE_KEY=\n# For production, set these:\nSPRING_PROFILES_ACTIVE=prod\nPORT=#{for Spring server}\n```\n\n## Important ⚠\n\nPlease examine the files [application.yml](src/main/resources/application.yml) (default),\nand [application-prod.yml](src/main/resources/application-prod.yml) (meant for _production_). Replace all the necessary\nSpring Application properties with yours. But for sensitive info (like Passwords or API Keys), **DON'T PASTE THEM IN\nTHERE DIRECTLY**❌ . It's safer to store them as Environmental Variables instead (see section above), then either\ndeclare them as `property.name = ${ENV_KEY_NAME}`, OR refer them directly in your source code as shown\nin [BraintreeConfig](src/main/java/com/davistiba/wedemyserver/config/BraintreeConfig.java).\n\n## Database Setup\n\nUsing any MySQL client, CREATE new database called `wedemy` (any name is OK), with charset `utf8mb4`. Then, follow\ncarefully instructions in [HELP.md](HELP.md#database-setup-info), for both MySQL and Redis. I have attached a mysqldump\nfile with [sample data](src/main/resources/data_wedemy.sql) for testing.\n\n## Quick Start 🚀\n\n### With Maven (directly)\n\nAssuming you have requirements listed above, and both your Dbs are running. Using your Terminal, execute the commands\nbelow. That's it! Server will be available at http://localhost:9000\n\n```bash\n./mvnw clean package\njava -jar target/wedemyserver.jar\n```\n\n### With Docker\n\nI have attached [Dockerfile](Dockerfile) for the Springboot server only. You will need to set up MySQL \u0026\nRedis separately. Refer to official Docker docs on how to pass ENV variables listed above.\n\n```bash\n  docker build -t wedemyserver ./\n  docker run --name \"wedemy\" -d -p9000:9000 wedemyserver\n```\n\n**Tip** 💡 : If using Docker Desktop (latest), before starting container, you can fill in the ENV vars in the GUI\ndirectly.\nSee [screenshot](src/main/resources/docker_env.PNG)\n\n## Deploying your App 🌍\n\nThis App can be easily deployed within few minutes, straight from GitHub to your Cloud PaaS of choice. You can either\nuse the [Dockerfile](Dockerfile) provided, or as a pure Java app. Popular PaaS with CI/CD for Java (without Dockerfile)\ninclude: Heroku, AWS ElasticBeanstalk, Google App Engine, Azure Web Apps. The following may **require** a Dockerfile:\nDokku, Railway, Render.com, Fly.io. Please note, you will also need a **separate** MySQL \u0026 Redis instance!\n\n## Payments Handling\n\nAll payments are securely handled by **Braintree Payments** (owned by PayPal), which supports cards, PayPal, Apple Pay,\nGooglePay, Venmo and many other methods. This project implements Credit-Card and PayPal Checkout only, in _Sandbox_\nmode: **No actual money is deducted at Checkout**. Make sure you obtain a set of 3 API Keys from\nyour own Braintree Dev Account and store them as ENV variables: `BT_MERCHANT_ID`, `BT_PUBLIC_KEY` and `BT_PRIVATE_KEY`.\nFor Braintree tutorials and samples, please check their [official docs](https://developer.paypal.com/braintree/docs).\n\n## License\n\n[MIT License](LICENSE) \u0026copy; 2021 - present, Davis T\n\n---\n\n[^1]: In production, for Browser clients, ensure both your Backend and Frontend share the same _ROOT_ domain (same-site\npolicy), AND set property `session.cookie.Secure=true` (strictly https) for Session Cookies to work properly. Learn\nmore at [WebDev](https://web.dev/samesite-cookies-explained/). Alternatively, you can replace Cookies **entirely** with\nspecial Header X-AUTH-TOKEN (by Spring; expires too). See file SecurityConfig.java.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongwater1234%2Fwedemyserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongwater1234%2Fwedemyserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongwater1234%2Fwedemyserver/lists"}