Installation
Leemons is essentially a set of npm packages.
1. Requirements
Node.js
All the Leemons packages are built in Javascript, so it is necessary to install Node.js in order to compile and run it. The version required is 16.14 or above, you can check it by running in your terminal:
node -v
You can use nvm for managing multiple Node versions on a single machine installed.
Yarn
We use Yarn for managing dependencies, because of the way it handles workspaces
in monorepos.
Once npm is installed the following can be run to install Yarn:
npm install --global yarn
PRIVILEGES
Depending on your system, it may be necessary to run this command with sudo
.
Python
Although Leemons is developed entirely in Javascript, some dependency libraries need to be compiled with Python.
It is possible to check if you have Python installed by running in your terminal:
python --version
2. Database
Leemons will be prepared to support both SQL and NoSQL databases, but in the beta version only a SQL database is supported. Follow the installation process for your preferred database:
MACOS Users
On macOS, you can install MySQL easily using Homebrew.
Run:
brew install mysql
and finally:
brew services start mysql
Database setup
Once the database engine is installed, a database must be created for use in Leemons.
For the purposes of this documentation, we will always be working with the following database configuration:
{
"host": "localhost",
"port": 3306,
"user": "leemons",
"password": "leemons",
"database": "leemons"
}
MySQL
Let's create a database named leemons
in your existing MySQL installation.
So, enter in your mysql
console:
sudo mysql
And run the following commands:
CREATE DATABASE IF NOT EXISTS `leemons` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'leemons'@'localhost' IDENTIFIED WITH mysql_native_password BY 'leemons';
GRANT ALL PRIVILEGES ON leemons.* TO 'leemons'@'localhost';
flush privileges;
3. Download
- Direct
- Clone with git
The latest version of Leemons can be run directly from Github.
DIRECTORY NAMING
For the purposes of this documentation, we are assuming that the folder generated by the archive, once unzipped, will be named my-leemons
.
You need git to be installed in your machine, you can check it by running in your terminal:
git --version
Navigate to the path where you want to download Leemons. For the purposes of this documentation, the destination path will be my-leemons
.
Then clone the repository:
cd my-leemons
git clone https://github.com/leemonade/leemons.git .
Project structure
Assuming Leemons has already been downloaded or cloned to a directory named my-leemons
, you will see the following minimal structure (we hide some folders and files for display purposes):
my-leemons
├── examples
│ └── demo
├── packages
│ ├── leemons
│ ├── leemons-utils
│ ├── leemons-database
│ ├── leemons-plugin-academic-calendar
│ ├── leemons-plugin-academic-portfolio
│ ├── leemons-plugin-assignables
│ ├── leemons-plugin-bulk-template
│ ├── leemons-plugin-calendar
│ ├── leemons-plugin-curriculum
│ ├── leemons-plugin-dashboard
│ ├── leemons-plugin-dataset
│ ├── leemons-plugin-emails
│ ├── leemons-plugin-grades
│ ├── leemons-plugin-scores
│ ├── leemons-plugin-tasks
│ ├── leemons-plugin-tests
│ ├── leemons-plugin-timetable
│ ├── leemons-plugin-users
│ └── leemons-react
├── package.json
└── yarn.lock
Project structure rundown
/examples/
- Contains the application examples./examples/demo/
- Contains the demo application we will use in this documentation.
/packages/
- Contains all the plugins and packages of Leemons.
4. Database connection configuration
Currently, Leemons needs a SQL and a Mongo connection at the same time. You can set the configuration of the database connection by modifying the file:
module.exports = {
connections: {
mysql: {
connector: 'bookshelf',
settings: {
client: 'mysql',
database: 'leemons',
username: 'leemons',
password: 'leemons',
host: 'localhost',
port: 3306,
pool: {
min: 5,
max: 1000,
},
},
},
},
mongo: {
connector: 'mongoose',
settings: {
database: 'leemons',
authDatabase: 'admin',
username: 'leemons',
password: 'leemons',
port: 27017,
host: 'localhost',
srv: false,
pool: {
min: 5,
max: 1000
}
}
}
defaultConnection: 'mysql',
};
Set database
, username
, password
, host
and port
to the values you configured here.
5. Bulk data creation template configuration
While the development of our Welcome Wizard is being finished, Leemons allows the ability to install the platform thanks to our "Bulk Templates".
These templates allow the choice between three different programmes according to your needs and can be customized at a later stage.
Download the template and see the tutorial
The easiest way to understand how our template works is to watch this short video tutorial.
When opening the Google spreadsheet file, please, create a copy first if you want to edit.
To download the excell file, please go to File > Download > Microsoft Excell (.xlsx)
ALL CENTERS
If you're feeling lucky, you can try our all-in-one template, which includes ESO, High School and Corporate.
We only recommend this if you are an experienced developer.
Template file
Once the template file has been downloaded and completed, rename it to data.xlsx
and copy it to the folder:
my-leemons/packages/leemons-plugin-bulk-templates/src/bulk/data.xlsx
my-leemons
└── packages
└── leemons-plugin-bulk-template
└── src
└── bulk
└── data.xlsx
IMPORTANT
In the case that an external storage provider has not been set up, check that the following folder exists:
my-leemons/packages/leemons-plugin-leebrary/files
If the folder does not exist, please create it.
6. Dependencies
Navigate to my-leemons/examples/demo
folder and run the following command to install all the dependencies:
yarn install
7. Run your Leemons 🚀
You need to launch 2 servers in order to run Leemons:
Core server
Still inside my-leemons/examples/demo
folder, run the following command to start the demo application backend:
yarn dev
BE PATIENT
Depending on the resources of your machine and the amount of template data to be uploaded, the bulk upload process can take between 15 and 20 minutes.
If everything has gone well, the bulk data loading of the template will start and once completed, the following message will be displayed on the terminal:
BULK DONE Template loaded
MAIN URL
The main URL of your Leemons application is http://localhost:8080/
.
Re-launch the application
In order to check if everything has gone well, kill or close the current terminal and re-launch the application by running again yarn dev
If everything has gone well, this time it will be possible to see the following message:
Listening on http://localhost:8080
Frontend server
In a new terminal, navigate to my-leemons/examples/demo
folder again and run the following command to start the demo application frontend:
yarn front
If everything has worked, the following message will appear on the terminal:
Serving!
- Local: http://localhost:3000
IMPORTANT
Don't kill or close your terminal while the servers are running, otherwise the servers will stop and the application will terminate.
8. Test your Leemons 👩💻
Once the frontend server ir running, test your Leemons application by opening the main URL http://localhost:8080 in your browser.