{"id":30746448,"url":"https://github.com/ismiljanic/syntaxbase-auth-ticketing-app","last_synced_at":"2026-04-28T21:34:19.544Z","repository":{"id":311147679,"uuid":"1033722621","full_name":"ismiljanic/Syntaxbase-auth-ticketing-app","owner":"ismiljanic","description":"This project is part of the SyntaxBase Intermediate Web Development Course. It serves as a hands-on full-stack lab that introduces users to practical concepts such as: Authentication \u0026 Authorization (OAuth2), Backend API Development with Node.js, PostgreSQL Integration, User Identification via OpenID Connect and QR Code Generation.","archived":false,"fork":false,"pushed_at":"2025-08-07T09:01:46.000Z","size":2507,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-22T12:45:59.697Z","etag":null,"topics":["auhtentication","auth0","backend","frontend","nodejs","oauth2","openid-connect","postgresql","qrcode-generator","syntaxbase"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/ismiljanic.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":"2025-08-07T08:46:45.000Z","updated_at":"2025-08-21T14:12:33.000Z","dependencies_parsed_at":"2025-08-22T12:46:04.194Z","dependency_job_id":"da2bc716-220c-43ee-8441-582f7102866d","html_url":"https://github.com/ismiljanic/Syntaxbase-auth-ticketing-app","commit_stats":null,"previous_names":["ismiljanic/syntaxbase-auth-ticketing-app"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ismiljanic/Syntaxbase-auth-ticketing-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismiljanic%2FSyntaxbase-auth-ticketing-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismiljanic%2FSyntaxbase-auth-ticketing-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismiljanic%2FSyntaxbase-auth-ticketing-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismiljanic%2FSyntaxbase-auth-ticketing-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismiljanic","download_url":"https://codeload.github.com/ismiljanic/Syntaxbase-auth-ticketing-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismiljanic%2FSyntaxbase-auth-ticketing-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273549251,"owners_count":25125257,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"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":["auhtentication","auth0","backend","frontend","nodejs","oauth2","openid-connect","postgresql","qrcode-generator","syntaxbase"],"created_at":"2025-09-04T04:02:04.213Z","updated_at":"2026-04-28T21:34:19.515Z","avatar_url":"https://github.com/ismiljanic.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SyntaxBase – Auth Ticketing App\n\nFull-stack project as part of the **SyntaxBase Intermediate Web Development Course**.\n\nThis project serves as a **hands-on lab assignment** within the _Intermediate Web Development_ course on the SyntaxBase platform. The goal is to implement a working web application with user authentication, secure ticket generation using QR codes, and proper backend integration using modern web technologies.\n\n---\n\n## Key Technologies\n\n- **Node.js** – Backend logic and API services\n- **EJS** – Server-side HTML templating\n- **CSS / HTML5** – UI layout and styling\n- **PostgreSQL** – Relational data persistence\n- **OAuth2 / OpenID Connect** – Secure authentication and authorization\n- **QR Code Generator** – Encoding tickets into scannable codes\n\n---\n\n## Functional Requirements\n\n- A **public homepage** displaying the total number of tickets generated\n- An **API endpoint** for ticket generation:\n  - Accepts JSON input with fields: `ID`, `firstName`, and `lastName`\n  - A maximum of **3 tickets per ID**\n  - Each ticket must have a **UUID identifier** from PostgreSQL\n  - The timestamp of ticket creation must be stored in the database\n  - On success, returns a **QR code image** encoding a URL with the ticket’s UUID\n  - The URL must **not contain** any personal data (name, surname, ID)\n  - Returns **HTTP 400** if required fields are missing or the ID already has 3 tickets\n  - Returns **HTTP 500** for server/internal errors\n  - Requires **OAuth2 Client Credentials** authorization (app-level, not user-level)\n\n- A **private ticket info page**, accessible only to authenticated users:\n  - Displaying ticket details based on UUID in URL\n  - Page shows the **logged-in user’s name** using **OpenID Connect**\n\n---\n\n## Project Implementation\n\nThe project is implemented using **Node.js** in the **VSCode** development environment. It uses the **EJS template engine** to render dynamic HTML and basic **CSS** for styling. Authentication and secure data handling are integrated with **OAuth2** and **OpenID Connect**.\n\n---\n\n## How to Run Locally\n\n### Requirements\n\n- [Node.js](https://nodejs.org/)\n- PostgreSQL\n- VSCode or another development IDE\n\n### Setup Steps\n\n1. **Clone the repository**\n2. Open the project folder in **VSCode**\n3. Navigate into the project directory (e.g. `cd syntaxbase-auth-ticketing-app`)\n4. Run `ls` and check if `node_modules` exists\n   \u003cimg src=\"pictures/pokretanje.png\" style=\"max-width: 100%; height: auto;\"\u003e\n\n5. If not, install dependencies:\n\n   ```bash\n   npm install\n6. Start the server\n   ``` bash\n   node server.js\n\n### Note:\nYou must:\n  - Set up your own PostgreSQL database\n  - Create a .env file\n  - Update Auth0 or your identity provider settings for OAuth2/OpenID integration\n\n## Feature Previews\n\n### Login Screen\n\u003cimg src=\"pictures/login.png\" style=\"max-width: 100%; height: auto;\"\u003e\n\n### Auth0 Login Flow\n\u003cimg src=\"pictures/loginAuth0.png\" style=\"max-width: 100%; height: auto;\"\u003e\n\n### Ticket Generation Form\n\u003cimg src=\"pictures/createTicket.png\" style=\"max-width: 100%; height: auto;\"\u003e\n\n### QR Code Result\n\u003cimg src=\"pictures/qrCode.png\" style=\"max-width: 100%; height: auto;\"\u003e\n\n### Ticket Information Page\n\u003cimg src=\"pictures/ticketInfo.png\" style=\"max-width: 100%; height: auto;\"\u003e\n\n## License\nThis project is intended for educational purposes only under the SyntaxBase platform. All rights reserved.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismiljanic%2Fsyntaxbase-auth-ticketing-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismiljanic%2Fsyntaxbase-auth-ticketing-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismiljanic%2Fsyntaxbase-auth-ticketing-app/lists"}