Skip to content

hpi-swa-teaching/SmalltalkDocs

Repository files navigation

🗄️ SmalltalkDocs "Smaprat"

Backend CI Backend Coverage Status Frontend CI

Introduction

SmalltalkDocs is a REST API for your Squeak image - it comes with the Smaprat web app to easily explore an image from within your web browser. The API is fully written in Smalltalk and known to work with Squeak 5.2, 5.3 and trunk. The provided Smaprat frontend is a React app and offers UI elements for all API capabilities.

Installation

Please follow these steps to run a SmalltalkDocs Smaprat on your own computer/server.

Smaprat API

Open your Squeak image and run the following code from within a workspace. This will install the API with all its dependencies.

Metacello new
    baseline: 'SmalltalkDocs';
    repository: 'github://hpi-swa-teaching/SmalltalkDocs:master/packages';
    load.

Afterwards, you can open the "RatPack Browser Window" with the "Apps" drawer and start the API itself by clicking on the white space and adding "SmapratApi".

Development

To be able to actively develop for SmalltalkDocs Smaprat, please clone this GitHub repository with the "Git Browser" and checkout all objects afterwards. (You may have to switch the baseline from above to the "dev" (or a different) branch first!)

All API routes are definied within the ./API-ROUTES.md.

Smaprat Frontend

Since the Smaprat frontend uses React, there are two fundamental ways to get a local copy running.

Easy Installation

Download the latest artifact .zip from the Github Actions page of this repository - e.g. for branch:master. The artifact is named "smaprat-frontend.zip" and contains a compiled version of the React .jsx code.

Next, you can place these files within the www folder of a supported webserver.
One popular solution is serve - install it via npm i -g serve and then run serve -s . inside the unzipped artifact directory (containing the index.html file). Alternatively, one can use e.g. Nginx with the provided file in app/nginx.example. This is recommended for larger scale deployments.

Advanced Installation

If you want to change things within the frontend or participate in development, please see ./app/README.md for more information.

License

MIT License - see LICENSE