Backend API for Sparkly, a platform for documenting progress, building projects consistently and creating a dynamic portfolio. This repository contains the C# / .NET backend that powers authentication, user accounts, project timelines and the core application logic used by the Sparkly web client.
Status: early development – the API, domain model and testing setup continue to evolve.
- .NET 9 (ASP.NET Core Web API)
- Entity Framework Core (code-first migrations)
- PostgreSQL (local or Docker)
- Docker + Docker Compose for containerization
- xUnit integration tests with TestServer
- GitHub Actions (build, tests, optional Docker build)
dotnetCLI and EF Core CLI
sparkly-server/
├─ src/ # API, domain and infrastructure
├─ Migrations/ # EF Core migrations
├─ sparkly-server.test/ # Integration tests
├─ Program.cs # Application entrypoint
├─ compose.yaml # Docker Compose stack
├─ Dockerfile # API image
├─ .github/workflows/ # CI pipelines
├─ appsettings.json # Base config
└─ appsettings.Development.json # Local overrides
src contains controllers, services, domain entities, validators and repository logic. Tests run in isolation with a clean database state.
- .NET 9 SDK
- Docker + Docker Compose
- Git
git clone https://github.com/SculptTechProject/sparkly-server.git
cd sparkly-serverConfiguration comes from appsettings.json and environment variables. Secrets should never be committed.
Example setup:
export ASPNETCORE_ENVIRONMENT=Development
export ConnectionStrings__DefaultConnection="Host=localhost;Port=5432;Database=sparkly;Username=sparkly;Password=changeme"
export Jwt__Issuer="https://sparkly.local"
export Jwt__Audience="sparkly-app"
export Jwt__Secret="super-long-secret-key-change-me"Providing an example config file (.env.example or appsettings.Development.example.json) is recommended.
dotnet restore
dotnet ef database updateDocker can also run migrations automatically depending on the setup.
Using dotnet:
dotnet restore
dotnet runUsing Docker Compose:
docker compose up --buildThis launches the API and PostgreSQL.
Integration tests run the API with an isolated in-memory server. Each test resets database state.
Run locally:
dotnet testRun through Docker Compose:
docker compose run --rm api dotnet testThe repository includes a pipeline triggered on push and pull requests. It performs:
- restore and build
- test execution
- optional Docker image build
This ensures the API stays stable across changes.
Current features:
- user authentication and login
- user profiles
- project creation and management
Planned development:
- project timelines and weekly logs
- build-in-public feed
- notifications
- subscriptions and billing
- admin and moderation tools
OpenAPI / Swagger documentation will be added.
Build the image manually:
docker build -t sparkly-server .Run the container:
docker run \
-e ASPNETCORE_ENVIRONMENT=Development \
-e ConnectionStrings__DefaultConnection="Host=db;Port=5432;Database=sparkly;Username=sparkly;Password=changeme" \
-p 8080:8080 \
sparkly-serverSecrets must be provided via environment variables or a secret manager.
Future keys may include:
- Stripe
- JWT
- OAuth providers (GitHub, Google)
- Open an issue or define a small task.
- Implement the change in a feature branch.
- Update or add tests.
- Run the build and tests locally.
- Open a pull request.
This keeps the repository clean and maintainable.
- refresh tokens
- public project pages
- project feed and logs
- email notifications
- admin foundations
- observability (logs, metrics, probes)
The codebase is currently maintained by the SculptTech / Sparkly team. External contributions will be accepted once the core platform stabilises.
License: TBD
Until finalised, treat the code as source-available only.