{"id":24084655,"url":"https://github.com/level09/vilcos","last_synced_at":"2025-04-30T20:45:54.361Z","repository":{"id":265155564,"uuid":"895300233","full_name":"level09/vilcos","owner":"level09","description":"A modern, full-stack web framework built on FastAPI and Vue.js with real-time capabilities.","archived":false,"fork":false,"pushed_at":"2024-12-01T00:20:31.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T07:21:56.450Z","etag":null,"topics":["fastapi","flask","python","saas","saas-boilerplate","vue","vuetify","websocket"],"latest_commit_sha":null,"homepage":"","language":"Python","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/level09.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}},"created_at":"2024-11-28T00:15:03.000Z","updated_at":"2024-12-01T00:20:34.000Z","dependencies_parsed_at":"2024-11-28T01:25:08.457Z","dependency_job_id":"e1ebe5c4-efd0-42da-bcbf-efe9f85e20de","html_url":"https://github.com/level09/vilcos","commit_stats":null,"previous_names":["level09/vilcos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/level09%2Fvilcos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/level09%2Fvilcos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/level09%2Fvilcos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/level09%2Fvilcos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/level09","download_url":"https://codeload.github.com/level09/vilcos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251780017,"owners_count":21642676,"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":["fastapi","flask","python","saas","saas-boilerplate","vue","vuetify","websocket"],"created_at":"2025-01-10T00:39:37.037Z","updated_at":"2025-04-30T20:45:54.338Z","avatar_url":"https://github.com/level09.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vilcos Framework 🚀\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/level09/vilcos/main/.github/images/vilcos.jpg\" alt=\"Vilcos Framework Logo\" width=\"300\"\u003e\n\u003c/p\u003e\n\nA modern, full-stack web framework built on FastAPI and Vue.js with real-time capabilities.\n\n## Features ✨\n\n- **Modern UI** - Vue 3 + Vuetify 3.7.3 for beautiful, responsive interfaces\n- **Authentication** - Secure session-based auth with Argon2 password hashing and role-based access control\n- **Database** - Async SQLAlchemy with PostgreSQL and connection pooling\n- **API Ready** - FastAPI-powered REST endpoints with automatic OpenAPI docs\n- **Developer Friendly** - CLI tools, hot reloading, and interactive shell\n- **Real-time WebSockets** - Multi-channel WebSocket support with JSON message broadcasting\n- **Session Management** - Redis-backed secure sessions with configurable settings\n- **User Management** - Complete user administration with CRUD operations\n- **Role-Based Access** - Flexible role management system with admin interface\n- **Modern Frontend** - Material Design Icons, Axios for HTTP requests, and responsive layouts\n\n## Quick Start 🏃\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/vilcos.git\ncd vilcos\n\n# Create and activate virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows use: venv\\Scripts\\activate\n\n# Install vilcos\npip install vilcos\n```\n\n### Environment Setup\n\n1. Set up your environment variables:\n\n```bash\n# Copy the sample environment file\ncp .env.sample .env\n\n# Edit .env with your configuration\nvim .env  # or use your preferred editor\n```\n\nRequired environment variables:\n```env\n# Database Configuration\nDATABASE_URL=postgresql+asyncpg://user:pass@localhost/dbname\n\n# Security Settings\nSECRET_KEY=your-secure-secret-key\nSESSION_COOKIE_NAME=vilcos_session\nSESSION_COOKIE_MAX_AGE=86400\nSESSION_COOKIE_SECURE=true\nSESSION_COOKIE_SAMESITE=lax\n\n# Redis Configuration\nREDIS_URL=redis://localhost:6379\n```\n\n2. Initialize and run:\n\n```bash\n# Create database tables and default roles\nvilcos init-db\n\n# Create an admin user (optional)\nvilcos create-admin\n\n# Start the development server\nvilcos run\n```\n\nYour app is now running at http://localhost:8000 🎉\n\n## Project Structure 📁\n\n```\nvilcos/\n├── .env.sample          # Sample environment configuration\n├── pyproject.toml      # Project configuration and dependencies\n├── requirements.txt    # Python dependencies\n└── vilcos/            # Main package\n    ├── static/        # Static assets\n    ├── templates/     # View templates\n    │   ├── admin/    # Admin interface templates\n    │   └── auth/     # Authentication templates\n    ├── routes/        # API endpoints and routes\n    │   ├── auth.py    # Authentication routes\n    │   ├── users.py   # User management routes\n    │   ├── roles.py   # Role management routes\n    │   └── websockets.py  # WebSocket routes\n    ├── models.py      # Database models\n    ├── schemas.py     # Pydantic schemas\n    ├── config.py      # Application settings\n    ├── db.py         # Database configuration and utilities\n    ├── auth_utils.py  # Authentication utilities\n    ├── utils.py      # Utility functions\n    ├── cli.py        # Command-line interface\n    └── app.py        # Application entry point\n```\n\n## Authentication 🔑\n\nVilcos uses a simple but secure session-based authentication system:\n\n- **Secure Password Storage**: Argon2 hashing (winner of the Password Hashing Competition)\n- **Session Management**: Redis-backed sessions with secure defaults\n- **Cookie Security**: HTTPOnly, Secure, and SameSite flags enabled\n- **Database Integration**: Direct SQLAlchemy models for user management\n\n### Routes\n\n- `/auth/signin` - User login\n- `/auth/signup` - New user registration\n- `/auth/signout` - User logout\n- `/admin/users` - User management dashboard\n- `/admin/roles` - Role management dashboard\n\n### Security Best Practices\n\n1. Generate a strong secret key:\n```python\npython -c \"import secrets; print(secrets.token_hex(32))\"\n```\n\n2. In production:\n- Set `SESSION_COOKIE_SECURE=True`\n- Use HTTPS\n- Configure Redis with authentication\n- Use strong database passwords\n\n## Key Features 🔑\n\n### User Management\n\nThe framework includes a comprehensive user management system:\n\n- **User Administration**\n  - Create, read, update, and delete users\n  - Manage user roles and permissions\n  - Toggle user activation status\n  - Secure password management\n\n- **Role Management**\n  - Create and manage custom roles\n  - Assign/remove roles from users\n  - Role-based access control for routes\n  - Admin interface for role management\n\n### WebSockets\n\n```javascript\n// Connect to a specific channel\nconst ws = new WebSocket('ws://localhost:8000/ws/mychannel');\n\n// Send JSON messages\nws.send(JSON.stringify({ \n    type: 'chat',\n    content: 'Hello everyone!' \n}));\n\n// Handle incoming messages\nws.onmessage = (event) =\u003e {\n    const data = JSON.parse(event.data);\n    console.log(`Received at ${data.timestamp}:`, data.data);\n};\n```\n\n### CLI Tools\n\n```bash\nvilcos version          # Show version\nvilcos run             # Start development server\nvilcos init-db         # Initialize database tables\nvilcos create-admin    # Create admin user\nvilcos shell           # Launch interactive shell\n```\n\n## Requirements 📋\n\n- Python 3.8+\n- PostgreSQL\n- Redis\n\n## Configuration ⚙️\n\nEssential `.env` settings:\n\n```env\nDATABASE_URL=postgresql+asyncpg://user:pass@localhost/dbname\nSECRET_KEY=your-secure-secret-key\nREDIS_URL=redis://localhost:6379\n```\n\n## Contributing 🤝\n\n1. Fork the repository\n2. Create feature branch (`git checkout -b feature/amazing`)\n3. Commit changes (`git commit -m 'Add feature'`)\n4. Push branch (`git push origin feature/amazing`)\n5. Open Pull Request\n\n## License 📄\n\nMIT License - see [LICENSE](LICENSE) file\n\n## Support 💬\n\n- GitHub Issues: Bug reports\n- GitHub Discussions: Questions\n- Documentation: [Coming Soon]\n\n---\n\nBuilt with ❤️ using FastAPI, Vue.js, and modern web technologies.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevel09%2Fvilcos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevel09%2Fvilcos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevel09%2Fvilcos/lists"}