Anahita Social Networking Platform

4.2.3 2016-09-21 22:52 UTC


Anahita social networking platform and framework

Version: 4.2.3 Birth Release

Anahita is a social networking framework and platform for building knowledge sharing apps and services. Use Anahita to launch:

  1. online learning and knowledge sharing networks
  2. information access networks about people, places, and things
  3. open science and open data networks
  4. online collaboration environments
  5. cloud back-end for your mobile apps

Anahita provides a genuine nodes and graphs architecture as well as design patterns for building apps that are smarter and inherently social.



  1. actors: people, groups, or build your own custom actor
  2. media: notes, topics, todos, photos, articles, or build your own custom media
  3. hashtags: all actors, media, and comments are hashtagable
  4. locations: all actors and media are geolocatable
  5. stories: updates created by actors for their followers


  1. social graph: people and groups can be followed by other people.
  2. hashtags: for actors, media, and comments
  3. mentions: tag people in media and comments
  4. locations: tag locations in media and actors and search nearby nodes
  5. notifications: a person receives an email notification whenever a comment is posted on an item they are subscribed to.
  6. votes: people can Like/Unlike media and comments


  • story feeds on dashboard and actor profiles
  • notifications

RAD Framework

  1. MVC rapid app development framework specialized for building social apps
  2. fully customizable theme and user interfaces
  3. extendable by social apps and components
  4. RESTful and JSON APIs (ideal to use Anahita as a back-end for mobile apps)
  5. Built using your favourite technologies such as PHP5, MySql, Bootstrap, JQuery, Grunt, Composer, LessCSS

Embryo and Birth releases

The code in the master branch is called the Embryo. It is what we use to power our website and it is constantly changing and evolving. It may contain bugs that are being fixed. Experimental features may be added and removed. Whenever we reach a specific milestone and the codebase is stable, it is packaged as a Birth relase.


System Requirements

Before you start please make sure that your server meets the following requirements:

  1. Linux or unix server
  2. Apache 2.0+ (with mod_mysql, mod_xml, mod_zlib) or Nginx
  3. MySql 5.0+
  4. php 5.3.3+ with APC
  5. Composer package management. You can download it following the instructions on or just run the following command:

curl -s | php

Important Notes

  1. If you have the suhosin patch installed on your server you might get an error. Add this line to your php.ini file to fix it: suhosin.executor.include.whitelist = tmpl://, file://
  2. If you have Zend Optimizer on your server disable it!
  3. Anahita is installed and managed via command line interface, because this is the most reliable approach especially after you accumulate large amounts of data in your database.

Installing a stable package

Installing Anahita using the Birth release code

Stable packages are called Birth releases. Use the following command to create an Anahita project called myproject. This command automatically downloads all the required files from the Anahita GitHub repository:

composer create-project anahita/project myproject

Now go to the myproject directory:

cd myproject

Continue with Initiating Installation from this point.

Installing from the master branch

Installing Anahita using the Embryo release code

The master branch always contains the Embryo release. Using the following command, clone the Anahita repository from the master branch:

git clone myproject

change directory to myproject

cd myproject

Now run the composer command to obtain all the 3rd party libraries that Anahita requires:

composer update

Continue with Initiating Installation from this point.

Initiating Installation

Initiating Anahita installation

If you type php anahita you get a list of all commands available to manage your Anahita installation. If the command didn't work, perhaps the symlink to the anahita command line tool isn't created. In this case run the following command to create a symlink. Otherwise move to the next step which is initiating the installation process.

ln -s bin/anahita anahita

In order to initiate the installation process run the following command and provide your database information when it is asked from you:

php anahita site:init

The Anahita installation is created in the PATH-TO-YOUR-DIRECTORY/myproject/www directory. You need to configure your server to use this directory as the public directory.

The first account that is created on this installation becomes the Super Administrator account. Go to the and create an account.

Congratulations! You have installed Anahita successfully. Now you need to configure your installation and install some apps.

Configuring Your Anahita Installation

Now you need to make some configurations before you can use your Anahita for development or production server. Go to /administrator to access the administration back-end.

Please Note: the administration back-end will be removed in Anahita 4.3 and all the administration features will be available on the front to the users with admin and super admin privileges.

Global Configuration

In the admin back-end go to the Configure tab. Here are the main settings that you should care about:

Site Name: the name of your site. This will show up in all the notifications emailed out to people.

Route Setting: Set to yes to get nice urls. If you are on an Apache server, you need to rename the htaccess.txt file in the www directory to .htaccess for this feature to work.

Server Settings: Set Error Reporting to none on production server.

Debug Settings: Set Debug System to yes if you are developing on Anahita or debugging an app.

Cache Setting: You don't need to use caching when developing, but on your production server select APC from the list and set Cache to yes. This will significantly speed up your site.

Session Settings: We prefer Database as the default setting.

Mail Settings: We prefer PHP Mail Function as the default setting. Enter a valid email address for Mail From this will show up in all the email notifications that people receive from Anahita. A valid email address will reduce the possibility of them getting picked up by spam filters. Enter your server's SMTP settings in the appropriate fields so notification emails get sent out.

Don't forget to Save or Apply or settings. Your settings are saved in the www/configuration.php file so make sure that this file has the appropriate write permissions.


Anahita emails out a lot of email notifications. In order for the notifications to get sent out, you need to setup a cron job on your server. In the admin back-end under the Extend tab go to the Notifications component. There you find the path and url that you need to use in your cron. There are many articles on the web to show you how to setup a cron job. Depending on your number of users and activity on your site, anywhere from 15 minute to 1 hour intervals will work. You will find the suitable interval after monitoring your Anahita installation for a while.

Installing Social Apps

Installing Anahita social apps

Now it is time to extend your Anahita installation with some apps and components. Anahita comes with a list of social apps which you can use as they are or use them as blueprints for developing your own custom apps.

To get a list of available apps simply type the following command:

php anahita package:list

Now in order to install an app, for example the Photos app, type the following command:

php anahita package:install photos

You can even provide a list of apps and components in one line. For example to install the Groups, Topics, and Connect apps use the following command:

php anahita package:install groups topics connect

In the administration back-end you can go to the Extend > Components and further define whether an app should optionally or always be available on actor profiles (people, groups, etc.). If an app is optionally available, then on each actor profile the app can be enabled under the Edit Profile > Apps.

Congratulations! You have just installed some apps and extensions on your Anahita installation.

Amazon S3 Storage

Nearly in all cases you wouldn't want to store the uploaded files on your own server. They add up very quickly and that makes it very difficult to maintain or migrate your Anahita installation. Anahita provides a plugin which allows all the uploaded files to be stored in the AWS or Amazon S3 cloud.

Under the Extend tab go to the Plugin Manager and then from the type list select Storage. Disable the Storage - Local plugin by clicking on the checkmark under the Published column. Then click on the Storage - Amazon S3 to edit the plugin. Configure the plugin with the following setting:

  • The folder to store the data: use assets as the default setting
  • Bucket: enter the name of your Amazon S3 bucket
  • Access Key: enter your AWS access key
  • Secret Key: enter your AWS secret key
  • Published: set to yes

Now click save to store the settings. Try uploading your avatar in the front-end and see if it gets uploaded properly. Check the image src to make sure it is an AWS url.

Join the Anahita Tribe

Anahita has an active and thriving tribe of hackers, entrepreneurs, and hackerpreneurs. They are helpful and friendly. So Join Us

Please Note: we do not answer questions in email. If you have any questions, please join the Anahita tribe and post your questions on the Tribe Support group where others can benefit from the answers too.

Report Bugs or Issues

There are so many ways that you can report us a bug:

Contribute to Anahita

Anahita could never be possible without the help of people in our tribe. We need contributors who can help us with testing, finding and fixing bugs, and coding of course. Here is a complete guideline of how you can contribute to Anahita.

Follow us, Like us

Follow us on twitter @anahitapolis and like our facebook page


Anahita is developed and maintained by rmdStudio Inc. a Vancouver software development company specialized in knowledge sharing cloud and mobile apps.