{"id":26902083,"url":"https://github.com/nathangtg/dynamo-db-flask-auth","last_synced_at":"2025-04-01T09:09:22.312Z","repository":{"id":271351295,"uuid":"913148275","full_name":"nathangtg/dynamo-db-flask-auth","owner":"nathangtg","description":"A streamlined authentication and authorization system for Flask APIs using DynamoDB, providing pre-built user management functionality to accelerate development of secure web applications","archived":false,"fork":false,"pushed_at":"2025-03-16T10:34:53.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T11:29:22.339Z","etag":null,"topics":["amazon-web-services","dynamodb","nosql","nosql-database","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","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/nathangtg.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":"2025-01-07T06:02:26.000Z","updated_at":"2025-03-16T10:35:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"1649af76-26f0-4a6b-8f73-bf313030a713","html_url":"https://github.com/nathangtg/dynamo-db-flask-auth","commit_stats":null,"previous_names":["nathangtg/dynamo-db-flask-auth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathangtg%2Fdynamo-db-flask-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathangtg%2Fdynamo-db-flask-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathangtg%2Fdynamo-db-flask-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathangtg%2Fdynamo-db-flask-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathangtg","download_url":"https://codeload.github.com/nathangtg/dynamo-db-flask-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246612474,"owners_count":20805355,"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":["amazon-web-services","dynamodb","nosql","nosql-database","python3"],"created_at":"2025-04-01T09:09:21.855Z","updated_at":"2025-04-01T09:09:22.304Z","avatar_url":"https://github.com/nathangtg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DynamoDB Flask Auth\n\nA streamlined authentication and authorization system for Flask APIs using DynamoDB as the database backend.\n\n## Overview\n\nDynamoDB Flask Auth simplifies the development of secure web applications by providing pre-built authentication and authorization functionality integrated with Amazon DynamoDB. This project serves as an excellent starting point for developers looking to create Flask APIs with robust user management capabilities.\n\n## Features\n\n- **User Authentication**: Complete login/registration system\n- **Token-based Authorization**: Secure JWT implementation\n- **DynamoDB Integration**: Pre-configured database models and controllers\n- **Scalable Architecture**: Organized project structure for easy extension\n- **API Routes**: Ready-to-use authentication endpoints\n\n## Project Structure\n\n```\napp/\n├── auth/\n│   ├── AuthController.py   # Authentication logic\n│   └── auth_util.py        # Helper functions for auth\n├── controllers/\n│   └── UserController.py   # User management logic\n├── database/\n│   └── Database.py         # DynamoDB connection management\n├── models/\n│   ├── baseEntity.py       # Base model class\n│   └── user.py             # User model definition\n├── routes/\n│   ├── AuthRoute.py        # Authentication endpoints\n│   └── UserRoute.py        # User management endpoints\n├── __init__.py             # Flask application initialization\n├── .gitignore              # Git ignore file\n├── Dockerfile              # Docker configuration\n└── requirements.txt        # Project dependencies\n```\n\n## Requirements\n\n- Python 3.6+\n- AWS Account with DynamoDB access\n- AWS credentials configured locally\n\n## Dependencies\n\n```\nbcrypt==4.2.1\nblinker==1.9.0\nboto3==1.35.92\nbotocore==1.35.92\ncffi==1.17.1\nclick==8.1.8\ncryptography==44.0.0\nFlask==3.1.0\nitsdangerous==2.2.0\nJinja2==3.1.5\njmespath==1.0.1\njwt==1.3.1\nMarkupSafe==3.0.2\npycparser==2.22\nPyJWT==2.10.1\npython-dateutil==2.9.0.post0\ns3transfer==0.10.4\nsix==1.17.0\nurllib3==2.3.0\nWerkzeug==3.1.3\n```\n\n## Quick Start\n\n### Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/yourusername/dynamo-db-flask-auth.git\ncd dynamo-db-flask-auth\n```\n\n2. Install dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n3. Configure AWS credentials:\n\n```bash\naws configure\n```\n\n4. Set up environment variables:\n\n```bash\nexport FLASK_APP=app\nexport FLASK_ENV=development\n```\n\n### Running the Application\n\n```bash\nflask run\n```\n\nThe API will be available at `http://localhost:5000`.\n\n## Configuration\n\nCreate a `.env` file in the root directory with the following variables:\n\n```\nAWS_REGION=your-aws-region\nDYNAMODB_TABLE_PREFIX=your-app-name\nJWT_SECRET_KEY=your-secret-key\n```\n\n## API Endpoints\n\n### Authentication\n\n- `POST /auth/register` - Register a new user\n- `POST /auth/login` - Authenticate and receive JWT token\n- `POST /auth/logout` - Invalidate JWT token\n\n### Users\n\n- `GET /users` - Get all users (requires admin permission)\n- `GET /users/\u003cuser_id\u003e` - Get specific user\n- `PUT /users/\u003cuser_id\u003e` - Update user information\n- `DELETE /users/\u003cuser_id\u003e` - Delete user\n\n## Docker Support\n\nBuild and run the application using Docker:\n\n```bash\ndocker build -t dynamo-db-flask-auth .\ndocker run -p 5000:5000 -e AWS_ACCESS_KEY_ID=your-key -e AWS_SECRET_ACCESS_KEY=your-secret dynamo-db-flask-auth\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- Flask documentation\n- AWS DynamoDB documentation\n- JWT authentication best practices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathangtg%2Fdynamo-db-flask-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathangtg%2Fdynamo-db-flask-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathangtg%2Fdynamo-db-flask-auth/lists"}