{"id":26190346,"url":"https://github.com/karan-develops/newzly","last_synced_at":"2026-02-09T17:30:52.534Z","repository":{"id":271590826,"uuid":"913929899","full_name":"Karan-develops/Newzly","owner":"Karan-develops","description":"A news app built on Next Js, having backend and frontend separate. It has cron-job enabled to fetch news and store it in database.","archived":false,"fork":false,"pushed_at":"2025-01-08T18:02:59.000Z","size":3123,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T13:52:10.806Z","etag":null,"topics":["express-js","nextjs","vercel"],"latest_commit_sha":null,"homepage":"https://newzly-karan.vercel.app","language":"TypeScript","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/Karan-develops.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-01-08T16:13:36.000Z","updated_at":"2025-04-13T09:52:49.000Z","dependencies_parsed_at":"2025-01-08T18:04:39.106Z","dependency_job_id":null,"html_url":"https://github.com/Karan-develops/Newzly","commit_stats":null,"previous_names":["karan-develops/newzly"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Karan-develops/Newzly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karan-develops%2FNewzly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karan-develops%2FNewzly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karan-develops%2FNewzly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karan-develops%2FNewzly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Karan-develops","download_url":"https://codeload.github.com/Karan-develops/Newzly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karan-develops%2FNewzly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29273649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T17:15:22.002Z","status":"ssl_error","status_checked_at":"2026-02-09T17:14:42.395Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["express-js","nextjs","vercel"],"created_at":"2025-03-12T00:53:28.904Z","updated_at":"2026-02-09T17:30:52.518Z","avatar_url":"https://github.com/Karan-develops.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔰 Newzly\n\n- A news app having built on Next Js, having backend and frontend separate. It has cron-job enabled to fetch news and store it in database.\n\n- Backend deployed on `render.com` and [frontend](https://newzly-karan.vercel.app/) on `vercel` under free tier.\n\n## 📚 Tech Stack\n\n- **Client:** Next JS, TailwindCSS\n- **Server:** Node, Express\n- **Datebase:** Mongo DB\n\n## 📦 API Reference, Routes \u0026 Misc\n\n| Route                      | Type     | Protected | Parameter                                                                                           | Description                                       |\n| :------------------------- | :------- | :-------- | :-------------------------------------------------------------------------------------------------- | :------------------------------------------------ |\n| `/api/services/send-email` | `POST`   | No        | `toName`, `toEmail`, `subject`, `message` (all body)                                                | Used to send mails                                |\n| `/api/data/get-news`       | `GET`    | No        | `category`, `country`, `page`, `limit` (all query)                                                  | Used to fetch news                                |\n| `/api/data/store-news`     | `POST`   | Yes       | `headline`, `description`, `category`, `country`, `publisher`, `image_link`, `news_link` (all body) | Push news to database fetched by `update-data.js` |\n| `api/data/delete-news`     | `DELETE` | Yes       | `None`                                                                                              | Delete news every 24 hour (5 items)               |\n\n- This project also has a `cron-job` which runs every `20 minutes` to add new data to database. This may be commmented while on development mode (suggested).\n- Also a `cron-job` to delete database items is scheduled and run `once every day` to delete 5 items from database. This may be also commmented while on development mode (suggested).\n- `Vercel Analytics` is also enabled for this web app\n\n## 🔩 Environment Variables\n\nThis project requirement .env configuration in `Backend` as well in `Frontend` folder.\n\n### Backend\n\n| Varibale         | Description                                     |\n| :--------------- | :---------------------------------------------- |\n| `MONGODB_URI`    | Database URI                                    |\n| `PORT`           | Port number for backend (5000)                  |\n| `EMAIL`          | admin mail address                              |\n| `PASSWORD`       | App password of email account                   |\n| `G_NEWS_API_KEY` | G News API key                                  |\n| `AUTH_KEY`       | Auth key to secure routes                       |\n| `HASHED_KEY`     | Double SHA-256 Hashed Auth key to secure routes |\n\n### Frontend\n\n| Varibale   | Description |\n| :--------- | :---------- |\n| `SITE_URL` | Site URL    |\n\n## 🔨 Setting Up\n\nFollow the following instruction to setup the project and run locally\n\n- Replace the backend URI to `http://localhost:5000` from `https://newzly.onrender.com`\n- Make sure, the environemental variables are set.\n- Open two seperate terminals and run `npm install` and then `npm run dev` in both terminals, one for backend and one for frontend. `package.json` is configured in a way it will start the dev mode by running `npm run dev`.\n- Hurray! your app will be started in development mode.\n\n## ⚡ Features\n\n- `Various News Types Supported:` World, General, Nation, Business, Technology, Entertainment, Sports, Science, Health.\n\n- `Wide Range of Countries Supported:` India, Brazil, Canada, France, Japan, United States\n\n## 📁 File Structure :\n\n```\nDirectory structure:\n└── Karan-develops-Newzly/\n    ├── Backend/\n    │   ├── index.js\n    │   ├── package-lock.json\n    │   ├── package.json\n    │   ├── .gitignore\n    │   ├── config/\n    │   │   └── db.js\n    │   ├── controllers/\n    │   │   ├── data.controller.js\n    │   │   └── email.controller.js\n    │   ├── middlewares/\n    │   │   └── protectRoute.js\n    │   ├── models/\n    │   │   └── news.model.js\n    │   ├── routes/\n    │   │   ├── data.route.js\n    │   │   └── email.route.js\n    │   └── scripts/\n    │       ├── delete-data.js\n    │       └── update-data.js\n    └── frontend/\n        ├── README.md\n        ├── eslint.config.mjs\n        ├── next.config.ts\n        ├── package-lock.json\n        ├── package.json\n        ├── postcss.config.mjs\n        ├── tailwind.config.ts\n        ├── tsconfig.json\n        ├── .gitignore\n        ├── app/\n        │   ├── error.tsx\n        │   ├── globals.css\n        │   ├── layout.tsx\n        │   ├── page.tsx\n        │   ├── hooks/\n        │   │   └── useInfiniteScroll.ts\n        │   ├── lib/\n        │   │   └── definition.ts\n        │   └── ui/\n        │       ├── loaders.tsx\n        │       ├── components/\n        │       │   └── NewsCard.tsx\n        │       └── landing/\n        │           ├── Footer.tsx\n        │           ├── Hero.tsx\n        │           ├── Navbar.tsx\n        │           └── News.tsx\n        └── public/\n            ├── assets/\n            └── fonts/\n                ├── Degunfa.ttf\n                ├── Dosis.ttf\n                ├── Galebok.otf\n                ├── Odin.otf\n                ├── RIntjany.ttf\n                └── youmurdererbb.ttf\n\n```\n\n## 🔥 Contributing\n\nContributions are always welcome! Additionally you can contact me by my email: **mrkaran2k5@gmail.com**. Some features which are developmemt and contributions can be made are:\n\n- [ ] Support for different languages.\n- [ ] Support for narration of news.\n- [ ] Support to save favourite news of user\n- [ ] AI chatbot for user interaction\n\n## 📷 Screenshots\n\n![banner](https://raw.githubusercontent.com/Karan-develops/Newzly/refs/heads/main/Screenshot%202025-01-08%20224755.png)\n\n\n## 🔒 License\n\nThis repository is open source and under [MIT](https://choosealicense.com/licenses/mit/) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaran-develops%2Fnewzly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaran-develops%2Fnewzly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaran-develops%2Fnewzly/lists"}