{"id":28262566,"url":"https://github.com/mahmud-r-farhan/event-booking","last_synced_at":"2025-07-18T08:34:23.753Z","repository":{"id":292770526,"uuid":"981678189","full_name":"mahmud-r-farhan/event-booking","owner":"mahmud-r-farhan","description":"A modern, full-stack Event Registration Application designed for seamless user registration, email notifications, and data management. Built with a robust tech stack, this app is responsive, scalable, and ready for deployment.","archived":false,"fork":false,"pushed_at":"2025-05-12T04:30:54.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-20T07:12:07.007Z","etag":null,"topics":["angular","event-booking","event-booking-application","event-registration","events","gmail-smtp","javascript","nodejs","postgresql","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/mahmud-r-farhan.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-05-11T16:47:54.000Z","updated_at":"2025-05-12T04:38:15.000Z","dependencies_parsed_at":"2025-05-12T04:25:45.295Z","dependency_job_id":"3b69054a-23e1-45de-a9c8-f93a3da76bf8","html_url":"https://github.com/mahmud-r-farhan/event-booking","commit_stats":null,"previous_names":["mahmud-r-farhan/event-booking"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mahmud-r-farhan/event-booking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fevent-booking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fevent-booking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fevent-booking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fevent-booking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahmud-r-farhan","download_url":"https://codeload.github.com/mahmud-r-farhan/event-booking/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fevent-booking/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265728868,"owners_count":23818731,"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":["angular","event-booking","event-booking-application","event-registration","events","gmail-smtp","javascript","nodejs","postgresql","typescript"],"created_at":"2025-05-20T07:12:06.652Z","updated_at":"2025-07-18T08:34:23.740Z","avatar_url":"https://github.com/mahmud-r-farhan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎉 Event Registration App\r\n\r\nA modern, full-stack Event Registration Application designed for seamless user registration, email notifications, and data management. Built with a robust tech stack, this app is responsive, scalable, and ready for deployment.\r\n\r\n## ✨ Features\r\n\r\n-   📋 **User-Friendly Registration Form**: Built with Angular Material for a sleek, modern UI.\r\n    \r\n-   📤 **Backend API Integration**: Securely sends form data to a Node.js/Express backend.\r\n    \r\n-   📬 **Email Notifications**: Sends confirmation emails via Gmail using Nodemailer.\r\n    \r\n-   🗄️ **PostgreSQL Database**: Stores registration data reliably with Neon.tech or local PostgreSQL.\r\n    \r\n-   ✅ **Real-Time Feedback**: Displays toast messages for form submission success or errors.\r\n    \r\n-   📱 **Responsive Design**: Optimized for mobile and desktop devices.\r\n    \r\n-   🌐 **Deployment-Ready**: Configured for easy deployment on popular platforms, including Docker and AWS.\r\n    \r\n-   🧩 **Modular Architecture**: Standalone Angular components for easy customization.\r\n    \r\n\r\n----------\r\n\r\n## 📦 Tech Stack\r\n\r\n| Layer        | Technologies                    |\r\n| ------------ | ------------------------------- |\r\n| **Frontend** | Angular, Angular Material       |\r\n| **Backend**  | Node.js, Express.js             |\r\n| **Database** | PostgreSQL (Neon.tech or local) |\r\n| **Email**    | Nodemailer (Gmail SMTP)         |\r\n\r\n\r\n----------\r\n\r\n## 📁 Project Structure\r\n\r\n```\r\nevent-booking/\r\n├── backend/\r\n│   ├── controllers/       # API logic\r\n│   ├── routes/            # Express routes\r\n│   ├── mailer.js          # Email configuration\r\n│   ├── db.js              # Database connection\r\n│   ├── .env               # Environment variables\r\n│   ├── server.js          # Backend entry point\r\n│   ├── Dockerfile         # Docker configuration for backend\r\n├── frontend/\r\n│   ├── src/\r\n│   │   ├── app/           # Angular components\r\n│   │   ├── assets/        # Static assets\r\n│   │   ├── styles.css     # Global styles\r\n│   ├── index.html         # Frontend entry point\r\n│   ├── Dockerfile         # Docker configuration for frontend\r\n├── docker-compose.yml     # Docker Compose for local development\r\n└── README.md              # Project documentation\r\n\r\n```\r\n\r\n----------\r\n\r\n## 🚀 Getting Started\r\n\r\nFollow these steps to set up and run the application locally.\r\n\r\n### Prerequisites\r\n\r\n-   **Node.js** (v16 or higher)\r\n    \r\n-   **Angular CLI** (`npm install -g @angular/cli`)\r\n    \r\n-   **PostgreSQL** (local or Neon.tech account)\r\n    \r\n-   **Gmail Account** (for email notifications)\r\n    \r\n-   **Docker** (for containerized deployment)\r\n    \r\n-   **AWS CLI** (for AWS deployment)\r\n    \r\n\r\n----------\r\n\r\n### 1. Clone the Repository\r\n\r\n```bash\r\ngit clone https://github.com/mahmud-r-farhan/event-booking.git\r\ncd event-booking\r\n\r\n```\r\n\r\n----------\r\n\r\n### ⚙️ Backend Setup (Local)\r\n\r\n#### 2. Install Backend Dependencies\r\n\r\n```bash\r\ncd backend\r\nnpm install\r\n\r\n```\r\n\r\n#### 3. Configure Environment Variables\r\n\r\nCreate a `.env` file in the `backend/` directory with the following:\r\n\r\n```\r\nPORT=5000\r\nDB_URL=your_postgres_connection_string\r\nEMAIL_USER=your_gmail_address@gmail.com\r\nEMAIL_PASS=your_gmail_app_password\r\n\r\n```\r\n\r\n\u003e **Note**: Replace `DB_URL` with your PostgreSQL connection string (e.g., from Neon.tech or local PostgreSQL). Use a **Gmail App Password** for `EMAIL_PASS` (see below for instructions).\r\n\r\n#### 4. Start the Backend Server\r\n\r\n```bash\r\nnode server.js\r\n\r\n```\r\n\r\nThe backend will run at `http://localhost:5000`.\r\n\r\n----------\r\n\r\n### 🖥️ Frontend Setup (Local)\r\n\r\n#### 5. Install Frontend Dependencies\r\n\r\n```bash\r\ncd frontend\r\nnpm install\r\n\r\n```\r\n\r\n#### 6. Run the Angular App\r\n\r\n```bash\r\nng serve\r\n\r\n```\r\n\r\nThe frontend will run at `http://localhost:4200`.\r\n\r\n\u003e **Important**: Ensure the backend server is running to enable form submissions.\r\n\r\n----------\r\n\r\n### 📧 Setting Up Gmail App Password\r\n\r\nTo use Nodemailer with Gmail, you need an **App Password**:\r\n\r\n1.  Go to [Google Account Security](https://myaccount.google.com/security).\r\n    \r\n2.  Enable **2-Step Verification** (if not already enabled).\r\n    \r\n3.  Navigate to **App Passwords**.\r\n    \r\n4.  Select **Mail** as the app and generate a password.\r\n    \r\n5.  Copy the generated password and use it as `EMAIL_PASS` in the `.env` file.\r\n    \r\n\r\n**⚠️ Do not use your regular Gmail password.**\r\n\r\n----------\r\n\r\n## 🐳 Deploying with Docker\r\n\r\n### 1. Create Dockerfiles\r\n\r\n#### Backend Dockerfile (`backend/Dockerfile`)\r\n\r\n```dockerfile\r\nFROM node:16\r\n\r\nWORKDIR /app\r\n\r\nCOPY package*.json ./\r\nRUN npm install\r\n\r\nCOPY . .\r\n\r\nEXPOSE 5000\r\n\r\nCMD [\"node\", \"server.js\"]\r\n\r\n```\r\n\r\n#### Frontend Dockerfile (`frontend/Dockerfile`)\r\n\r\n```dockerfile\r\nFROM node:16 AS build\r\n\r\nWORKDIR /app\r\n\r\nCOPY package*.json ./\r\nRUN npm install\r\nCOPY . .\r\nRUN npm run build --prod\r\n\r\nFROM nginx:alpine\r\nCOPY --from=build /app/dist/frontend /usr/share/nginx/html\r\nEXPOSE 80\r\nCMD [\"nginx\", \"-g\", \"daemon off;\"]\r\n\r\n```\r\n\r\n### 2. Create Docker Compose File (`docker-compose.yml`)\r\n\r\n```yaml\r\nversion: '3.8'\r\nservices:\r\n  backend:\r\n    build: ./backend\r\n    ports:\r\n      - \"5000:5000\"\r\n    env_file:\r\n      - ./backend/.env\r\n    depends_on:\r\n      - db\r\n  frontend:\r\n    build: ./frontend\r\n    ports:\r\n      - \"4200:80\"\r\n  db:\r\n    image: postgres:13\r\n    environment:\r\n      POSTGRES_USER: your_db_user\r\n      POSTGRES_PASSWORD: your_db_password\r\n      POSTGRES_DB: event_booking\r\n    volumes:\r\n      - pgdata:/var/lib/postgresql/data\r\nvolumes:\r\n  pgdata:\r\n\r\n```\r\n\r\n\u003e **Note**: Update `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` in `docker-compose.yml` and ensure they match your `DB_URL` in the backend `.env`.\r\n\r\n### 3. Build and Run with Docker Compose\r\n\r\n```bash\r\ndocker-compose up --build\r\n\r\n```\r\n\r\n-   Backend: `http://localhost:5000`\r\n    \r\n-   Frontend: `http://localhost:4200`\r\n    \r\n-   Database: Managed by the PostgreSQL container\r\n    \r\n\r\n### 4. Push Docker Images to AWS ECR (Optional)\r\n\r\n#### Create ECR Repositories\r\n\r\n```bash\r\naws ecr create-repository --repository-name event-booking-backend\r\naws ecr create-repository --repository-name event-booking-frontend\r\n\r\n```\r\n\r\n#### Authenticate Docker with ECR\r\n\r\n```bash\r\naws ecr get-login-password --region your-region | docker login --username AWS --password-stdin your-account-id.dkr.ecr.your-region.amazonaws.com\r\n\r\n```\r\n\r\n#### Build, Tag, and Push Docker Images\r\n\r\n```bash\r\n# Backend\r\ndocker build -t event-booking-backend ./backend\r\ndocker tag event-booking-backend:latest your-account-id.dkr.ecr.your-region.amazonaws.com/event-booking-backend:latest\r\ndocker push your-account-id.dkr.ecr.your-region.amazonaws.com/event-booking-backend:latest\r\n\r\n# Frontend\r\ndocker build -t event-booking-frontend ./frontend\r\ndocker tag event-booking-frontend:latest your-account-id.dkr.ecr.your-region.amazonaws.com/event-booking-frontend:latest\r\ndocker push your-account-id.dkr.ecr.your-region.amazonaws.com/event-booking-frontend:latest\r\n\r\n```\r\n\r\n----------\r\n\r\n## ☁️ Deploying on AWS\r\n\r\n### 1. Set Up an RDS PostgreSQL Database (Optional)\r\n\r\nIf not using Neon.tech:\r\n\r\n-   Create a PostgreSQL RDS instance in the AWS Console.\r\n    \r\n-   Note the endpoint and credentials, and update `DB_URL` in your `.env`.\r\n    \r\n\r\n### 2. Create an ECS Cluster\r\n\r\n-   Go to the **AWS ECS Console** and create a new cluster (e.g., `event-booking-cluster`).\r\n    \r\n-   Choose **Fargate** for serverless deployment.\r\n    \r\n\r\n### 3. Define Task Definitions for Backend and Frontend\r\n\r\n(See the original documentation for the exact JSON definitions.)\r\n\r\n### 4. Create Services in ECS\r\n\r\n-   Use the **backend** and **frontend** task definitions.\r\n    \r\n-   Set up **load balancers (ALB)** to route traffic to appropriate ports.\r\n    \r\n\r\n### 5. Update the Frontend API URL\r\n\r\nUpdate the frontend’s API URL in `frontend/src/app/app.component.ts` to point to the backend’s ALB DNS name.\r\n\r\n### 6. Deploy and Test\r\n\r\n-   Deploy the services in the ECS Console.\r\n    \r\n-   Access the frontend via the frontend ALB DNS name.\r\n    \r\n\r\n----------\r\n\r\n## 🌐 Alternative Deployment Platforms\r\n\r\nIn addition to AWS, you can deploy to:\r\n\r\n-   **Backend**: Render, Railway\r\n    \r\n-   **Frontend**: Vercel, Netlify, Firebase Hosting\r\n    \r\n\r\n----------\r\n\r\n## 🛠️ Customizing the App\r\n\r\nModify the app to suit your needs:\r\n\r\n-   **Form Fields**: Edit form and styling in `frontend/src/app/app.component.html` and `frontend/src/styles.css`.\r\n    \r\n-   **API Logic**: Update endpoints in `frontend/src/app/app.component.ts`.\r\n    \r\n-   **Database Schema**: Modify the SQL table in `backend/controllers/registerUser.js`.\r\n    \r\n-   **Email Templates**: Customize email content in `backend/mailer.js`.\r\n    \r\n\r\n----------\r\n\r\n## Troubleshooting\r\n\r\n-   **Form Submission Fails**: Ensure the backend ALB DNS is correctly set in the frontend and security groups allow traffic.\r\n    \r\n-   **Email Not Sending**: Verify `EMAIL_USER` and `EMAIL_PASS` in the ECS task definition and check Gmail’s App Password settings.\r\n    \r\n-   **Database Connection Issues**: Confirm the `DB_URL` is correct and the RDS/Neon.tech database is accessible from the ECS tasks.\r\n    \r\n-   **Docker Build Fails**: Check Dockerfiles for errors and ensure dependencies are installed.\r\n    \r\n\r\n----------\r\n\r\n## 🤝 Contributing\r\n\r\nContributions are welcome! To contribute:\r\n\r\n1.  Fork the repository.\r\n    \r\n2.  Create a new branch (`git checkout -b feature/your-feature`).\r\n    \r\n3.  Commit your changes (`git commit -m \"Add your feature\"`).\r\n    \r\n4.  Push to the branch (`git push origin feature/your-feature`).\r\n    \r\n5.  Open a Pull Request.\r\n    \r\n\r\n----------\r\n\r\n## 📜 License\r\n\r\nThis project is licensed under the MIT License (LICENSE).\r\n\r\n----------\r\n\r\n##  Author\r\n\r\n**Mahmud**  \r\nGitHub: [Mahmud](https://github.com/mahmud-r-farhan)  \r\nEmail: dev@devplus.fun\r\n\r\n----------\r\n\r\n## Acknowledgments\r\n\r\n-   Angular for the powerful frontend framework.\r\n    \r\n-   Angular Material for beautiful UI components.\r\n    \r\n-   Node.js and Express.js for the backend.\r\n    \r\n-   Nodemailer for email functionality.\r\n    \r\n-   Neon.tech for managed PostgreSQL.\r\n    \r\n-   Docker for containerization.\r\n    \r\n-   AWS for cloud deployment.\r\n    \r\n\r\n----------\r\n\r\n## ⭐ Enjoying the project? Give it a star on GitHub!\r\n\r\nFeel free to open issues or submit pull requests for improvements.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmud-r-farhan%2Fevent-booking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahmud-r-farhan%2Fevent-booking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmud-r-farhan%2Fevent-booking/lists"}