Skip to content
No description, website, or topics provided.
JavaScript HTML CSS
Branch: master
Clone or download
David Judge
David Judge modified
Latest commit b59c579 May 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode ran npm audit fix May 3, 2019
docs modified May 13, 2019
resources fixed folder access issues in packed form Mar 18, 2019
src beautified view.template.ejs May 5, 2019
.gitignore added .vscode to gitignore May 3, 2019
README.md final Thesis structure May 10, 2019
package-lock.json fixed circular templates May 5, 2019
package.json fixed circular templates May 5, 2019
webpack.config.js cleaned the project up Mar 17, 2019

README.md

ERScaffold

ERScaffold is a code generator for websites, which uses ERModel as abstraction, so that makes it possible to generate complex frontend with a complex backend.

For more details, please read the docs/Thesis/thesis.pdf .

Let's check out

Requirements:

  • Linux\GNU or Mac
  • NodeJS
  • NPM
  • Git

First, you will need to install dependencies with npm i,
after that you can run with npm run dev.

Quick guide for a blog

For this test you will need docker, and docker-compose.

After you have ran npm run dev, you can start with electron, which makes it easier to launch.
(For e.g : electron path/of/this/folder path/of/the/new/project)
Or you can use npm run dev if you are familiar with that.

Setup project folder and run the app

~$ mkdir blogtest
~$ cd blogtest
~/blogtest$ git init

Draw ER Model

Start application with the ~/blogtest folder, or start then select the ~/blogtest folder in order to start drawing. When the application is starting, you will see a guide. If you move your mouse over that guide, the guide will disappear. By this guide draw your model.

Generation

If there is a project folder selected, and you wrote something into the AppName field, you are able to generate the code by clicking on Generate.

You will see a window for selecting requirements. Please consider that, those are just example templates.

After selection, you should click on the select button, and it will returns 'All fine!' message if everything was alright. Otherwise you will see an error message, that you should tell me by the github's issue tracker.

Run the example site

sudo systemctl start docker
sudo docker-compose up -d

While the server is running, you can edit the lib/<APP_NAME>_web/router.ex file and add a new route like: resources '/something', <EntityName>Controller.

For e.g: resources '/posts', PostController. When you save the file, by the phoenix's live-reload, you can see on localhost:4000/posts.

If something is not working then it is template-related problem, you can add custom templates, and you can modify the existing templates too. For details, please read the above mentioned thesis.

Contributing

I'd love to see any kind of contribution.

You can’t perform that action at this time.