Getting Started - IIIA-KO/Lanka GitHub Wiki

Setting up Lanka locally involves preparing the development environment and running the backend services. Follow these steps to get started:

  1. Clone the Repository: Obtain the source code from GitHub and open the solution in your IDE of choice (e.g., Visual Studio or Jetbrains Rider).
  2. Install Prerequisites: Ensure you have .NET 8+ installed for running the application. You’ll also need Docker (with Docker Compose) to run dependent services like the database and message broker.
  3. Run Backend Services: Use Docker Compose to spin up all required infrastructure:
    • PostgreSQL Database: For persistent data storage (exposed on port 5432 with default credentials in docker-compose.yml).
    • RabbitMQ: The message broker for events (exposed on port 5672; management UI on 15672 with user guest/guest.
    • Keycloak (Identity Provider): For authentication and authorization (exposed on port 18080 with admin console; default admin/admin credentials, auto-importing a realm for Lanka).
    • Seq (Logging) & Jaeger (Tracing): Seq’s web UI on port 8081 and Jaeger UI on 16686 for monitoring logs and traces.
    • Redis (Cache): Running on port 6379, used for caching and other distributed features.
    • Lanka.API & Lanka.Gateway: The application itself. The API service (port 4307) hosts the business logic, and the Gateway service (port 4308) acts as a reverse proxy and enforces policies.

You can start all of these by running in root directory:

docker-compose up -d

This will build the Lanka API and Gateway images and start all containers.

  1. Access the System: Once running, you can access the Gateway at http://localhost:4308 (which forwards to the API on 4307). If a Swagger UI or API endpoints are available, they will be accessible via API URL. The Keycloak server will be at http://localhost:18080 (use the Keycloak admin console to manage realms, users, etc. if needed). The RabbitMQ management interface is at http://localhost:15672 (to inspect message queues), and Seq’s dashboard is at http://localhost:8081 for viewing structured logs.

  2. Configure Clients: (If applicable) To test the system, you might register a new user via the API (once the user registration endpoint is ready). The system uses Keycloak for auth, so you may need to configure a Keycloak realm client for the frontend or API testing. By default, a realm is imported with preset configuration for development.

  3. Review Documentation: Refer to the repository’s docs directory for detailed design information and to understand the domain concepts before diving into the code. This will help in exploring the API endpoints and understanding module behaviors.