Getting Started
DreamTime is open-source and anyone can contribute to their code, improve it, implement ideas or create their own version for private or public use (respecting the license).
info
This document contains the instructions to prepare the user interface code (DreamTime), for the AI ​​algorithm code visit this page.
Repositories
DreamTime source code is hosted in these places:
info
If you are planning to contribute with a Pull Request please do it on GitHub by forking the canary branch.
Requirements
Experience
It will be easier for you to work with the code if you have experience in:
- HTML, CSS and JavaScript.
- SCSS: CSS Preprocessor.
- TailwindCSS: CSS Framework.
- VueJS and NuxtJS: JavaScript frameworks.
- Electron: Software used to "transform" DreamTime from a website to a desktop application.
Setup
All the source code is in the src
folder, this instructions are based on that folder.
Directory Structure
Directory | Description |
---|---|
build | Files used by electron-builder. |
electron | "Backend" code, must be compiled with Babel. |
modules | Code and utilities out of the scope of NuxtJS. |
patches | Monkey-patches |
scripts | External scripts. |
Others | See NuxtJS Directory Structure. |
Dependencies
Install the project dependencies running this command:
yarn install
Development enviroment
Run the following commands to start the dev environment, once prepared you will have the DreamTime window, the DevTools and hot-reload ready.
yarn run start:nuxt
yarn run start:babel
yarn run start:electron
info
If you are using Visual Studio Code you can run the task Build
to open the first two commands in parallel terminals and press F5
to run the last command and open the DreamTime window.
Scripts
These are the commands that you can run with yarn run <command>
:
Command | Description |
---|---|
lint | Run eslint to validate that the code complies with our syntax. |
start:nuxt | Run the NuxtJS development server with hot-reload. |
start:babel | Compile the electron folder with hot-reload. |
start:electron | Open Electron using the compiled code from the previous command. |
build | Compile the NuxtJS code, the electron folder, and create a ready-to-distribute executable. |
clean | Delete folders with compiled code. |
optimize | Run modclean to clean the node_modules folder and decrease the size of the executable. |
build:nuxt | Compile the NuxtJS code. |
build:babel | Compile the electron folder. |
build:electron | Create a ready-to-distribute executable. |
build:dev | Same as build but without running optimize . |
preview:production | Compile the NuxtJS code, the electron folder and open Electron as if it were the production executable. |
postinstall | It is executed automatically when running yarn install , for now it is responsible for running patch-package to apply monkey-patches to some libraries. |
test | Should run a series of tests to verify that the project works as it should, but these tests have not been created. 🤡 |
deploy | Run @dreamnet/deploy to upload the ready-to-distribute executable to multiple file providers. |