Skip to content

About

Minimal Python order service and tests used as a sandbox for ByteRover in Windsurf.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Windsurf Order Service Demo with ByteRover: A tiny order service used to try ByteRover with Windsurf

Windsurf Order Service Demo with ByteRover

A tiny order service used to try ByteRover with Windsurf

A minimal Python order service with an in-memory store and pytest tests, intended as a sandbox for trying ByteRover context memory in the Windsurf editor.


Built by Studio1 Built with ByteRover

ByteRover docs  ·  ByteRover  ·  More examples  ·  studio1hq.com


Overview

This repo is a small sandbox for trying ByteRover with the Windsurf editor. It contains one tiny Python order service and its tests, which is enough code to practise capturing context and reusing it in an AI coding session.

The repo does not include ByteRover configuration or generated context. It holds only the sample code, so treat it as a starting point rather than a finished demo.

Features

  • Order creation: create_order(store, order_id) charges the store and returns {"order_id": ..., "status": "CREATED"}.
  • Swappable stores: InMemoryStore records charged order ids in a set, and DatabaseStore is a stub that prints the charge.
  • Tests: four pytest tests cover a successful order, an empty id, several orders on one store and a second order after a first.

Tech stack

Layer Tool
Language Python 3
Testing pytest
Context memory ByteRover
Editor Windsurf

Getting started

Prerequisites

  • Python 3.10 or later
  • pytest
  • Optional: the ByteRover CLI and Windsurf, to try the context workflow on this code

Installation

git clone https://github.com/Studio1HQ/Windsurf-ByteRover.git
cd Windsurf-ByteRover/byterover-windsurf-demo
pip install pytest

Run

pytest

How it works

byterover-windsurf-demo/
  order_service.py       create_order(store, order_id)
  store.py               DatabaseStore (stub) and InMemoryStore
  test_order_service.py  pytest tests using InMemoryStore

create_order calls store.charge(order_id) and returns a CREATED status. The tests pass an InMemoryStore and check that the order id appears in its charged set.

Resources



Studio1

Built by Studio1, the technical content and DevRel partner for devtool teams. Made with ByteRover.
Browse more open-source examples at github.com/Studio1HQ.

Website Book a call X LinkedIn

studio1hq.com · Technical content, docs, video and DevRel for devtools

About

Minimal Python order service and tests used as a sandbox for ByteRover in Windsurf.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages