{"id":20761289,"url":"https://github.com/2sky/vidyanoravensample","last_synced_at":"2026-04-19T22:32:26.906Z","repository":{"id":96856213,"uuid":"274492280","full_name":"2sky/VidyanoRavenSample","owner":"2sky","description":"Sample application using Vidyano and RavenDB","archived":false,"fork":false,"pushed_at":"2025-09-01T15:55:10.000Z","size":50,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-26T10:47:17.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/2sky.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-06-23T19:32:00.000Z","updated_at":"2025-09-01T15:55:13.000Z","dependencies_parsed_at":"2025-09-01T17:24:44.348Z","dependency_job_id":"5fcd315d-06d5-416a-9945-073d5efa8413","html_url":"https://github.com/2sky/VidyanoRavenSample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/2sky/VidyanoRavenSample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2sky%2FVidyanoRavenSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2sky%2FVidyanoRavenSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2sky%2FVidyanoRavenSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2sky%2FVidyanoRavenSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2sky","download_url":"https://codeload.github.com/2sky/VidyanoRavenSample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2sky%2FVidyanoRavenSample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32025603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-17T10:18:43.654Z","updated_at":"2026-04-19T22:32:26.875Z","avatar_url":"https://github.com/2sky.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VidyanoRavenSample\n\nA sample application demonstrating the integration of [Vidyano](https://www.vidyano.com) application framework with [RavenDB](https://ravendb.net/) document database, running on ASP.NET Core 9.0 with Docker support.\n\n## Overview\n\nThis project serves as a reference implementation for building modern web applications using:\n- **Vidyano Framework** - A complete application framework for data-driven applications\n- **RavenDB** - A NoSQL document database with ACID guarantees\n- **ASP.NET Core 9.0** - Modern, cross-platform web framework\n- **Docker** - Containerized deployment support\n\nThe sample includes a complete Northwind-style demo application with companies, orders, products, and employees to demonstrate real-world patterns and best practices.\n\n## Prerequisites\n\n- [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)\n- [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) (17.8+) or [Visual Studio Code](https://code.visualstudio.com/)\n- [Docker Desktop](https://www.docker.com/products/docker-desktop) (optional, for containerized development)\n- [RavenDB](https://ravendb.net/download) (or use Docker: `docker run -p 8080:8080 ravendb/ravendb`)\n\n## Getting Started\n\n### Quick Start\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/yourusername/VidyanoRavenSample.git\n   cd VidyanoRavenSample\n   ```\n\n2. **Run RavenDB** (if not already running)\n   ```bash\n   docker run -d -p 8080:8080 --name ravendb ravendb/ravendb\n   ```\n\n3. **Build and run the application**\n   ```bash\n   dotnet run --project VidyanoRavenSample/VidyanoRavenSample.csproj\n   ```\n\n4. **Access the application**\n   - Navigate to `https://localhost:5001` or `http://localhost:5000`\n   - Login with default credentials: **admin/admin**\n   - You'll be prompted to change the password on first login\n\n### Development\n\n```bash\n# Build the project\ndotnet build\n\n# Run with hot reload\ndotnet watch run --project VidyanoRavenSample/VidyanoRavenSample.csproj\n\n# Run in Docker\ndocker build -f VidyanoRavenSample/Dockerfile -t vidyanoravensample .\ndocker run -p 5000:80 vidyanoravensample\n```\n\n## Project Structure\n\n```\nVidyanoRavenSample/\n├── Service/                       # Core business logic\n│   ├── VidyanoRavenSampleContext.cs    # RavenDB context and data access\n│   ├── Models.cs                        # Domain models (Company, Order, Product, etc.)\n│   ├── ModelIndexes.cs                  # RavenDB indexes and projections\n│   ├── GettingStartedActions.cs         # Vidyano UI actions\n│   ├── VidyanoRavenSampleBusinessRules.cs # Business rules (extensible)\n│   └── VidyanoRavenSampleWeb.cs        # Custom API endpoints (extensible)\n├── App_Data/                      # Application configuration\n│   ├── model.json                       # Vidyano application model\n│   ├── security.json                    # Security configuration\n│   └── culture.json                     # Localization data\n├── Program.cs                     # Application entry point\n├── Startup.cs                     # Service configuration\n└── CreateSampleDataOperation.cs   # Sample data generation\n\n```\n\n## Features\n\n### Domain Model\n- **Companies** - Customer and supplier management\n- **Orders** - Complete order processing with order lines\n- **Products** - Product catalog with categories\n- **Employees** - Employee management with territories\n- **Regions** - Geographic organization\n\n### Technical Features\n- Document database with ACID transactions\n- Full-text search capabilities via RavenDB indexes\n- Map-Reduce aggregations for reporting\n- Value objects for domain modeling (Address, Contact, etc.)\n- Automatic sample data generation\n- Docker container support\n- Hot reload for development\n\n## Configuration\n\n### Database Connection\n\nEdit `appsettings.json` to configure your RavenDB connection:\n\n```json\n{\n  \"RavenSettings\": {\n    \"Urls\": [\"http://localhost:8080\"],\n    \"DatabaseName\": \"VidyanoRavenSample\"\n  }\n}\n```\n\n### Security\n\nThe application uses Vidyano's built-in security features. Default configuration is in `App_Data/security.json`. \n\n⚠️ **Important**: Change the default admin password immediately after first login.\n\n## Architecture\n\n### Key Components\n\n1. **Vidyano Framework Integration**\n   - Configured via `AddVidyanoRavenDB()` in Startup.cs\n   - Provides UI generation, security, and data operations\n\n2. **RavenDB Document Store**\n   - Session-per-request pattern\n   - Automatic change tracking\n   - LINQ query support\n\n3. **Domain-Driven Design**\n   - Value Objects for complex types\n   - Aggregate roots with proper boundaries\n   - Entity references using document IDs\n\n### Data Access Pattern\n\n```csharp\n// Access data through the context\npublic class VidyanoRavenSampleContext : RequestScopeProvider\u003cVidyanoRavenSampleContext\u003e\n{\n    public IQueryable\u003cCompany\u003e Companies =\u003e Query\u003cCompany\u003e();\n    public IQueryable\u003cOrder\u003e Orders =\u003e Query\u003cOrder\u003e();\n    // ... other entities\n}\n```\n\n## Development Tips\n\n- The database and sample data are created automatically on first run\n- Use RavenDB Studio (http://localhost:8080) to inspect and manage data\n- Vidyano actions in `GettingStartedActions.cs` handle UI operations\n- Custom business rules can be added to `VidyanoRavenSampleBusinessRules.cs`\n- API endpoints can be extended in `VidyanoRavenSampleWeb.cs`\n\n## Troubleshooting\n\n### RavenDB Connection Issues\n- Ensure RavenDB is running on the configured port (default: 8080)\n- Check firewall settings if using remote RavenDB server\n- Verify the database name in appsettings.json\n\n### Docker Issues\n- For Docker Desktop on Windows, use `host.docker.internal` instead of `localhost` in connection strings\n- Ensure Docker Desktop is running before building containers\n\n## License\n\n[Your License Here]\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Support\n\nFor Vidyano framework support: https://www.vidyano.com\nFor RavenDB support: https://ravendb.net/support","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2sky%2Fvidyanoravensample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2sky%2Fvidyanoravensample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2sky%2Fvidyanoravensample/lists"}