{"id":20811634,"url":"https://github.com/alexy-os/adminity","last_synced_at":"2026-04-10T23:47:13.799Z","repository":{"id":257174947,"uuid":"857244073","full_name":"alexy-os/AdminitY","owner":"alexy-os","description":"AdminitY is a secure and modular admin panel built using Node.js, Express, Handlebars, and NeDB for database management","archived":false,"fork":false,"pushed_at":"2024-09-20T07:33:43.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T14:47:58.171Z","etag":null,"topics":["admin","admin-dashboard","admin-panel","auth","authentication","dashboard","dashboard-templates","handlebars","handlebars-js","handlebarsjs","miniapp","nedb","node","nodejs","tailwindcss","telegram","telegram-bot","telegramapp","webapp"],"latest_commit_sha":null,"homepage":"","language":"Handlebars","has_issues":false,"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/alexy-os.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}},"created_at":"2024-09-14T06:16:13.000Z","updated_at":"2024-12-05T14:02:11.000Z","dependencies_parsed_at":"2024-09-15T06:14:47.067Z","dependency_job_id":"a061aeec-4625-49ec-b318-2f22f8f85b02","html_url":"https://github.com/alexy-os/AdminitY","commit_stats":null,"previous_names":["alexy-os/adminity"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2FAdminitY","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2FAdminitY/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2FAdminitY/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2FAdminitY/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexy-os","download_url":"https://codeload.github.com/alexy-os/AdminitY/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243158972,"owners_count":20245669,"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":["admin","admin-dashboard","admin-panel","auth","authentication","dashboard","dashboard-templates","handlebars","handlebars-js","handlebarsjs","miniapp","nedb","node","nodejs","tailwindcss","telegram","telegram-bot","telegramapp","webapp"],"created_at":"2024-11-17T20:45:33.145Z","updated_at":"2026-04-10T23:47:08.745Z","avatar_url":"https://github.com/alexy-os.png","language":"Handlebars","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AdminitY\n\n**AdminitY** is a secure and modular admin panel built using **Node.js**, **Express**, **Handlebars**, and **NeDB** for database management. It is designed to handle user authentication, CRUD operations, and dynamic content rendering, providing a robust solution for admin interfaces.\n\n### Features\n\n- **User Management**: Easily create, update, and delete user records with different access levels (approved, lead).\n- **Dynamic Content Rendering**: Handlebars templating engine for server-side rendering of views.\n- **Session Management**: Secure session handling with user authentication via **Telegram**.\n- **Ajax-Based CRUD Operations**: Handles operations asynchronously through RESTful endpoints.\n- **NeDB Integration**: Lightweight, file-based database solution for managing user data.\n- **Customizable UI**: Easily adaptable UI components with Handlebars, supporting conditional rendering and dynamic data display.\n\n### Project Structure\n\n```bash\n.\n├── assets/                  # Static assets (CSS, JS, Images)\n├── data/\n│   └── users.db             # NeDB database for storing user information\n├── views/\n│   └── pages/               # Handlebars templates for rendering pages\n├── index.js                 # Main server entry point\n└── config.js                # Configuration file (e.g., session secret, bot usernames)\n```\n\n### Core Functionalities\n\n1. **User Authentication via Telegram**\n   - The app uses a Telegram bot for login and verifies the username against an allowed list.\n   - It allows only authorized users to access the dashboard and settings.\n\n2. **User Management**\n   - Add new users as either `approved` or `lead` types.\n   - Display a list of users, sorted based on the user type and other parameters like `timestamp` and `username`.\n   - Users can be edited or removed dynamically using the provided endpoints.\n\n3. **CRUD Operations with NeDB**\n   - **Insert**, **update**, and **delete** operations are supported for user data.\n   - NeDB is used to store user records in a local `users.db` file.\n   - The app sorts and filters user data for different views like approved users and lead users.\n\n4. **Session and Authentication Middleware**\n   - The application leverages Express sessions to store user data securely during their login session.\n   - Middleware ensures only authenticated users can access certain routes, like the dashboard or settings.\n\n5. **Dynamic Content Rendering**\n   - Handlebars templates are used to render user-friendly and customizable web pages.\n   - Includes helper functions to format dates and conditionally display content based on data values.\n\n### Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/your-repo/AdminitY.git\n   cd AdminitY\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n3. Configure environment variables in `config.js`:\n   - Set your session secret, allowed Telegram usernames, and bot username.\n\n4. Start the server:\n   ```bash\n   npm start\n   ```\n\n   The app will run on port `3008` by default.\n\n5. To use **ngrok** for local testing:\n   ```bash\n   ngrok http 3008\n   ```\n\n   The generated ngrok URL will be saved to `ngrok-url.txt` for external access.\n\n### API Endpoints\n\n- **GET /login**: Renders the login page for Telegram authentication.\n- **POST /auth/telegram**: Authenticates users based on their Telegram credentials.\n- **GET /dashboard**: Displays the admin dashboard for authorized users.\n- **GET /users**: Lists approved users.\n- **POST /users**: Adds a new user to the database.\n- **POST /users/:id/delete**: Deletes an existing user.\n\n### Future Enhancements\n\n- Add support for more user roles and access levels.\n- Implement two-factor authentication for higher security.\n- Expand database support to include MongoDB or PostgreSQL for larger-scale applications.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexy-os%2Fadminity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexy-os%2Fadminity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexy-os%2Fadminity/lists"}