Giter Site home page Giter Site logo

msramalho / feup-mfes Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 9.97 MB

Alloy4fun from 0 to reality

Home Page: http://alloy4fun.di.uminho.pt

Dockerfile 0.32% Java 6.85% CSS 19.24% HTML 8.85% JavaScript 64.73%
feup mieic mfes alloy mongodb meteor docker api-rest ci formal-methods

feup-mfes's Introduction

Alloy4fun

Web app for editing, sharing and interpreting Alloy models in your browser, in real time. Build Status

Originally developed at U. Minho and Haslab. Improved by Faculty of Engineering of the University do Porto. This repo was developed with the help of @Dannyps and refers to the v1.0.0 version of alloy4fun, so it is not expected to updated, the live repo can be found here. A complete list of changes done by @FEUP team can be found in the report.

LIVE DEMO: http://alloy4fun.di.uminho.pt (still not updated to the latest version last time we checked)

ABOUT: Alloy4Fun is being developed using:

  • Meteor framework which is a full-stack JavaScript platform for developing modern web and mobile applications.
  • Docker is used to ensure a simple and ubiquitous development environment.
  • Travis CI is used for continuous integration through the .travis.yml file.

Contributing and Development Guidelines

You can contribute by looking at the issues section.

INFO: The application contains three main services/containers:

  1. api - where a Java web service is used to interact with the alloytools API
  2. mongo - the instance of mongodb that has data persistance outside docker
  3. meteor - the webapp that interacts with the other services

SETUP: To start the application in your development environment:

  1. Install docker, npm, ...
  2. clone the repo
  3. cp .env.example .env and edit it if necessary
  4. docker-compose up (pass -d for detached mode)

READY: You can now:

Meteor Development with real-time updates

Since the meteor instance running inside docker is statick and has to be built everytime a change is made (docker-compose build meteor), it is not very good for development.

To have real-time updates while you develop meteor you can run it on your computer (after cd meteor) with npm start.

API

Since the api is essentially an Alloy4fun webservice a local jar file is used for stability purposes the lib folder structure is required for maven to detect the local repository.

To run the api isolated do cd api and then docker build -t alloy4fun-api . && docker run -p 8080:8080 alloy4fun-api for now it can be accessed at http://localhost:8080/

You can also run it outside docker, just take a look at its Dockerfile, essentially you need:

  1. mvn clean install
  2. java -Djava.net.preferIPv4Stack=true -jar /home/target/alloy4fun-api-swarm.jar

Database

The database is saved to a volume in data/db/ and backups can be made by copying this folder elsewhere.

Meteor

Meteor will run locally on port 3000 and on port 3010 in docker so that there is no interference between both instances.

Testing

Unit tests are enabled on both client and server code, with the appropriate chromedriver packages needed for integration and acceptance tests.

To run the tests just do npm test

Linter

Linter is also installed and configured but not included in the CI pipeline, to run the linter you can do npm run lint inside the meteor folder. To run linter without the --fix option do eslint ..

To include the linter in the CI pipeline (first make sure all linter errors are fixed) and then add the following to the package.json scripts: "pretest": "npm run lint --silent"

feup-mfes's People

Contributors

dannyps avatar msramalho avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.