Lessons · Getting started · 4 of 36
Projects and templates
New Project, Create blank project, and how a project is laid out.
A Vi project is a folder. Its code lives in src/: the app starts in src/main.vi, and
every file in src/ sees every other file's names (no imports). Pictures and sounds go in assets/.
- File → New Project… asks for a name, a place and a template, then creates the folder and opens it.
- Opened an empty folder? The Explorer shows Create blank project. One click writes a small app into the folder and opens src/main.vi. Under it, or start from a template… offers the other templates. (A folder that already has .vi files is left alone.)
The templates are small, finished apps you can learn from and change:
| Template | What it is |
|---|---|
| Blank | One welcome card: src/main.vi and src/config.vi, nothing else. |
| Counter | A tally with a goal, a progress bar and round buttons. |
| To-do | Tasks you add, tick off and delete, with an empty state. |
| Tic-tac-toe | Two players, a 3×3 board and a running score. |
| Comet Glide | A tap-to-fly arcade game: steer a comet through gates of light. |
| Trip Buddy | A big travel app that shows off most of Vi: five tabs, a trip screen, popups and a side menu, live weather and exchange rates, a map, a budget slider, a photo journal, three themes, three languages, Pro purchase, a PIN lock, a jumping game and a chart written in JavaScript. |
Every template is laid out the same way, so you always know where to look:
README.md
assets/ icon.png and splash.png (and your pictures and sounds)
src/
main.vi the main screen: puts the pieces together
config.vi app name, version, icon, splash screen
theme.vi the colours
tasks.vi the data and the functions that change it (game.vi, world.vi … in others)
components/ one file per piece of the screen
The lesson Files and projects explains how the files see each other.
Every example here runs in Vi Studio: open it in your browser (phones too) and press Start learning on the welcome page. Each code block there has a Try it button that runs it in the phone preview.
More in Getting started
- Welcome to ViWhat Vi is and how Vi Studio works.
- Vi in five minutesContainers, data, functions and layout in four small apps.
- Your first appA complete counter app, line by line.
About Vi. Vi is a free, open-source programming language for building real mobile apps. You describe each screen in plain words, and Vi compiles it to React Native (Expo) for Android, iOS and the web. Its editor, Vi Studio, runs on Windows, in any browser and on your phone, with the app running live as you type. Read more about Vi.