Welcome! This guide will take you through the end-to-end process of using Solid Fortnight, from setting up the platform to evaluating feature flags and tracking real-time events.
The easiest way to get started is by using the provided Docker Compose setup.
make start-allThe system will be accessible through the API Gateway on port 8080.
Once the platform is running, you can access the Admin Dashboard at http://localhost:5173.
- Create a Project: Click "New Project" and give it a name like "Tutorial Project".
- Create an Environment: Inside your project, click "Add Environment". Call it
Productionwith keyprod. - Create a Feature Flag: Click "New Flag". Use key
show-beta-featureand typeboolean.
Click on your new flag to open the detail view.
- Add a Variation: Ensure you have variations for
trueandfalse. - Set Default: Set the default variation to
false. - Add a Rule:
- Attribute:
user_group - Operator:
EQUALS - Values:
beta-testers - Return:
true
- Attribute:
- Save: Click "Save Configuration".
You can now test your flag using the Evaluator API (via the Gateway).
Request: POST http://localhost:8080/api/v1/evaluate
{
"project_id": "{{project_id}}",
"environment_key": "prod",
"flag_key": "show-beta-feature",
"context": {
"user_id": "user-1",
"attributes": { "user_group": "standard" }
}
}Response: {"value": false, "reason": "default variation"}
Request: Same endpoint
{
"project_id": "{{project_id}}",
"environment_key": "prod",
"flag_key": "show-beta-feature",
"context": {
"user_id": "user-2",
"attributes": { "user_group": "beta-testers" }
}
}Response: {"value": true, "reason": "rule match: ..."}
The easiest way to use Solid Fortnight in your application is via the "Single-Key" initialization pattern. You only need the API Gateway URL and an SDK Key.
import { Client } from '@solid-fortnight/client-js';
const client = new Client({
baseUrl: 'http://localhost:8080',
apiKey: 'your-sdk-key'
});
await client.init();
const isEnabled = client.boolVariation('show-beta-feature', { id: 'user-123' }, false);import "github.com/adafia/solid-fortnight/sdk/server-go"
client, _ := sdk.NewClient(sdk.Config{
BaseURL: "http://localhost:8080",
APIKey: "your-sdk-key",
})
isEnabled := client.BoolVariation("show-beta-feature", engine.UserContext{ID: "user-123"}, false)- Concepts: Read the Core Concepts guide.
- SDKs: Integrate with your application using our SDKs.
- Architecture: Learn how the services work together in the Architecture docs.