Try our demo
Take Imagine's demo apps for a spin.
Play around with our and get a feel of our compiler's functionality by running a simple command in your terminal.
Our demo apps will be organized by the key frameworks we support. We currently have a demo app for Django, and as we release support for more frameworks, we will add demo apps for each below.
Django
Here's a simple step-by-step walk through of what you can do with our demo app:
- Copy and paste the command below into your terminal to download our demo django-app on your machine.
Note: running the above command requires the
npm
package manager being installed on your computer. If you get the errornpm: command not found
when you run the command, you will need to install npm first.You will now be able to see the created files for the demo app when you list the files in the current directory by running
ls
.
You can install all the dependencies for the Django app by running
make install
in your terminal. This will install all project dependencies for Django, REST, GraphQL etc.You can run your Django app by running
make run
in your terminal. This will open a web server at http://127.0.0.1:8000/demo/You can also open the files that are a part of the Django demo-app in your code editor. In this demo, these are the files that are generated by Imagine's SmartCompiler from a single
django-app.im
Imagine config file:
- You can now make changes to the
django-app.im
Imagine config file and use the Imagine SmartCompiler'scompile
command to generate code with your changes. (learn about the various domains we support and how you can write our simple config syntax for each domain)
As an example, lets open the file django-app.im
and add a new field rating
to one of the Data Models called Album.
You can now run
imagine compile django-app.im
to generate new Django code with this change.This would update a number of files -
demo/mutations/album.py
,demo/tests/factories.py
,demo/tests/musicianApi_test.py
,demo/tests/albumApi_test.py
,demo/types.py
,demo/models/album.py
. For example, if you now look at the filedemo/models/album.py
, you will see your newly added fieldrating
.
- You can also check the test coverage for this app (including any updates you make) using the following command. All Imagine generated code has 100% test coverage for unit tests and end-to-end tests ๐
Node
coming soon, with ๐งก
React
coming soon, with ๐
React Native
coming soon with ๐