Gyroscope is an incredibly lightweight framework that allows you to truly express the power of relational databases. When navigation of entities is templatized and consistent, it allows you to focus on the nature of the data and how you will use it to empower an organization. So how can you get started?
You will need a web server capable of running PHP and MySQL. If you are brand new to coding and want something to install straight away, use MAMP. With a few clicks you can have a web server up and running.
After downloading Gyroscope, you will see a folder structure that looks like the following:
- [_] connectors
- [_] encdec
- [_] protected
- [_] template
- [_] utils
- changes.txt
- nano_changes.txt
- readme.txt
A more descriptive map explains the context of a gyroscope application:
The readme.txt file is helpful to access gyroscope documentation, as well as a YouTube series for getting started. We will cover those steps as part of the article.
Gyroscope is usually positioned as a "back-end" interface to a standard site. For example, if I have a shopping webiste (myshop.com), the gyroscope admin interface will be (myshop.com/admin). If you have noticed, myshop.com should have the server configured so the document root is /site (myshop.com yields index.html, rather than myshop.com/site). This is so you have access to non-site accessible folders such as data (for SQL) or protected documents (uploaded files).
The core of the example is in template/htdocs/*. Every file and folder in this path (appicons, help, icl, ..) are needed to run the example. You can copy this entire directory over to a content directory webserver. For a standard apache webserver, this folder is called "htdocs". Create a folder "admin" within htdocs then copy the contents from template/htdocs to htdocs/admin.
Gyroscope uses a database connection for its own configuration settings. You are also encouraged to build off this database for your gyroscope application, but adding tables and records. A starting structure is available for you in template/data/gyrostart.sql. You can import this SQL file either through the mysql command line, or by using PhpMyAdmin (available on the homescreen of MAMP). Navigate to the databases tab, then click New on the list of databases. The database name can be "gyrostart" and the character set "latin1_bin". From there, choose "Import" then upload the "gyrostart.sql" file. You should see some tables created such as 'accesslog', 'actionlog', 'faults', 'gss', etc.
From there, navigate to the connection string located in the file /template/htdocs/connect.php. Line 10 and 13 describe the database connections associated with the $db variable. Change the arguments in sql_get_db to match the username and password. The starting example has 'root' as the username and 'mnstudio' as the password.
Now, open up your gyroscope environment by navigating to your localhost/admin directory. You should see a login page, with default credentials "admin" as the username and "demo" as the password.
Violà! Your gyroscope installation is up and running.