How do you start using?
For the API Framework:
- Download Genes
- Find a web server environment that meets the requirements (online or local): Apache, MySQL, PHP
- Upload Genes (does not have to be web reachable)
- Go to the domain folder where your clone will work, create (or upload) an index.php as the one below.
<?php
// JUST FIX THE PATH (COULD BE RELATIVE OR NOT)
// SO THAT THE CLONE INDEX FINDS THE GENES FRAMEWORK
require "../../_genes/api/genes.php";
// Index view is the main necessary view of the clone.
// You have more views, create more. You don't need more views.
// You can create all functionality in the same function.
// No one cares.
g::def("clone", array(
"Index" => function () {
g::run("ui.LoadViewHtml");
},
));
// Till now Genes got your config, your customizations,
// figured out the environment, figured out the mods,
// figured out the views, urls, the functions to be triggered,
// so now it renders.
g::run("core.Render");
// Done.
// A clean setup. :)
// A Genes Clone.
- When you browse to the domain of the clone, Genes will setup, create necessary files, like config.json and more. Create a simple ui html file, app.html, for you to customize.
- So now you have a working Genes Clone.
For the UI Framework:
- Just include the lines below in your html anywhere (preferrably in the <head>)
<script src="https://ui.genes.im/js/genes.js"></script>
<link rel="stylesheet" href="https://ui.genes.im/css/genes.css">