- .NET SDK, >= 8.0.0
- verify with
dotnet --version
- verify with
- nodejs, >=18
- verify with
node --version
- verify with
- npm, >=9
- likely part of nodejs installation
- verify with
npm --version
- docker, >= 24
- verify with
docker --version - this is required for database setup
- verify with
- Any F# IDE, e.g. Visual Studio Code + Ionide extension, Rider, Visual Studio
This needs to be done once per repository download.
- Clone this repo
- Run dotnet tool restore
- Run npm install
Note
After starting the database for the first time you will need to setup the db from online ressources. This can be done by Swobup on http://localhost:8000/docs. You can find the credentials in the docker-compose file (SWOBUP_USERNAME=swobup, SWOBUP_PASSWORD=test).
Run:
- PUT
api/v2/database/init - PUT
api/v2/ontology/build
You can verify the correct task execution on redis. It might happen that some ontologies fail to build, in this case you can try to build them again with POST api/v2/ontology and the correct link from our ontology repository.
./build.cmd run db, to start up Swate (+ Database network)
Swate runs on https://localhost:3000, Swobup on http://localhost:8000/docs, Database - Neo4j can be viewed in the browser on http://localhost:7474/browser/.
Warning
Should the neo4j database not correctly start up with ./build.cmd run db delete the container (only container not the volume) and start it again. This can be easily done with the docker ui. Open the swate_dev network and click on the thrash bin icon next to the neo4j container.
If you know a solution to this issue, please let us know 😞
Edit: This issue does not arise if you stop the container before shutting down your computer.
Usage: ./build.cmd <command>
run [db] Start .net backend server, vite frontend (and database,
swobup with docker if `db`)
test Run all tests
src/Components is a reusable React component library that can be published to npm and reused by src/Client and src/Electron/src/Renderer. It contains Storybook/Vitest-based component tests and usage documentation.
To run the Storybook playground for src/Components, run npm run storybook in the src/Components directory.
To run the playground , run npm start in src/Components. You can edit src/Components/playground/App.tsx to test out components in a live environment. This is useful for testing out new components or UI logic without needing to run the entire Client or Electron app.
The Electron app is still in early development and not fully integrated into the main build process. To run the Electron app, navigate to src/Electron and run npm start. This will start the Electron application with hot-reloading for the renderer process.
If you want to contribute to Swate, open an issue with the feature/bug you want to work on. This way you can ensure that your approach is in line with the project goals and you can get feedback from the maintainers.
Afterwards you can fork the repository and start working on your feature/bug. When you are done, describe your changes in CHANGELOG.md following the Keep a Changelog format and open a pull request.
We are currently still working on a nice project structure. For now ask us if any questions arise in the related GitHub issue!
Check out the following files for more specific contribution guidelines:
- docs/Structure.md for architecture and project structure guidelines.
- docs/ReactComponentDesign.md for guidelines on designing reusable React components in
src/Components.
Important
Use VS Code or Rider for development, as they allow autoformatting via Fantomas on file save. This ensures that the code style is consistent across the project and reduces the amount of formatting-related comments in pull requests.
The GitHub API consolidates the Zen of GitHub in its own codebase, in 14 aphorisms:
- Responsive is better than fast
- It’s not fully shipped until it’s fast
- Anything added dilutes everything else
- Practicality beats purity
- Approachable is better than simple
- Mind your words, they are important
- Speak like a human
- Half measures are as bad as nothing at all
- Encourage flow
- Non-blocking is better than blocking
- Favor focus over features
- Avoid administrative distraction
- Design for failure
- Keep it logically awesome