PHPackages                             anahita/anahita - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. anahita/anahita

ActiveProject[Framework](/categories/framework)

anahita/anahita
===============

Anahita Knowledge Networking Platform and Framework

v4.8.1(3y ago)4438.0k167[5 PRs](https://github.com/anahitasocial/anahita/pulls)2GPL-3.0-onlyPHPPHP &gt;=7.4

Since Jul 22Pushed 2y ago62 watchersCompare

[ Source](https://github.com/anahitasocial/anahita)[ Packagist](https://packagist.org/packages/anahita/anahita)[ Docs](https://www.Anahita.io)[ RSS](/packages/anahita-anahita/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (7)Versions (63)Used By (2)

[![Anahita social networking platform and framework](https://camo.githubusercontent.com/b223494013d6fe51ab071bea3da5f337b7133e700925d7504e81cb9d9d477eef/68747470733a2f2f73332e63612d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f70726f64756374696f6e2e616e61686974612e696f2f6d656469612f6c6f676f732f686f6d65706167655f6c6f676f2e706e67)](https://camo.githubusercontent.com/b223494013d6fe51ab071bea3da5f337b7133e700925d7504e81cb9d9d477eef/68747470733a2f2f73332e63612d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f70726f64756374696f6e2e616e61686974612e696f2f6d656469612f6c6f676f732f686f6d65706167655f6c6f676f2e706e67)

Anahita
=======

[](#anahita)

*Version:* 4.8.3 Embryo Release

Anahita is a platform and framework for developing open science and knowledge-sharing applications on a social networking foundation. Use Anahita to build:

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 nodes and graphs architecture for developing social networking apps.

##### Table of Contents

[](#table-of-contents)

- [Concepts](#concepts)
- [System Requirements](#system-requirements)
- [Upgrading](#upgrading)
- [Installation on a development machine](#installation-on-a-development-machine)
- [Building an AWS EC2 server and installing Anahita](#building-an-aws-ec2-server-and-installing-anahita)
- [Settings](#anahita-settings)
- [Support](#support)
- [Reporting Bugs &amp; Issues](#reporting-bugs--issues)
- [Contribute to Anahita](#contribute-to-anahita)
- [Follow us, Like us](#follow-us-like-us)
- [Credits](#credits)

Concepts
--------

[](#concepts)

### Nodes

[](#nodes)

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

### Graphs

[](#graphs)

1. **social graph:** people and groups can be followed by others.
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 email notification whenever a comment is posted on an item to which they are subscribed.
6. **votes:** people can Like/Unlike media and comments

### Stories

[](#stories)

- story feeds on dashboard and actor profiles
- notifications

### RAD Framework

[](#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

[](#embryo-and-birth-releases)

The code in the `master` branch is called the **Embryo**. It is what we use to power our website [Anahita.io](https://www.anahita.io) and is constantly changing and evolving. It may contain bugs that we are fixing, or we may add or remove experimental features. Whenever we reach a specific milestone, and the codebase is stable, we package it as a **Birth** release.

System Requirements
-------------------

[](#system-requirements)

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

1. Linux or Unix server
2. Nginx or Apache 2.0+
3. MySql 5.7
4. Redis (optional) any hosted and managed Redis service will do. For example AWS ElastiCache Redis.
5. Use PHP version 7.4 to 8.0 for best results.
6. Composer package management. You can download it following the instructions on  or just run the following command:

`curl -s http://getcomposer.org/installer | php`

### Important Notes

[](#important-notes)

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://`

Anahita is installed and managed via shell CLI because this is the most reliable approach, especially after you accumulate large amounts of data in your database.

Installation on a development machine
-------------------------------------

[](#installation-on-a-development-machine)

### Installing a stable package

[](#installing-a-stable-package)

We call the stable packages *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](https://github.com/anahitasocial):

`composer create-project anahita/project myproject`

Now go to the *myproject* directory:

`cd myproject`

Continue with \[Initiating Installation\] (#initiating-installation) from this point.

### Installing from the master branch

[](#installing-from-the-master-branch)

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

`git clone git@github.com:anahitasocial/anahita.git 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-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, initiating the installation process.

`ln -s bin/anahita anahita`

To initiate the installation process, run the following command and provide your database information when it asks you:

`php anahita site:init`

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

Congratulations! You have installed Anahita successfully. Now you need to signup as a Super Administrator.

### Signing Up The Super Administrator

[](#signing-up-the-super-administrator)

The first person that is signing up with Anahita becomes the *Super Administrator*. Use the following command to create the first account:

`php anahita site:signup`

Provide a valid *email* and *username*. You can provide a password, or Anahita automatically creates a strong password for you.

**Congratulations!** You have created the first person and Super Admin account. Point your browser to your Anahita installation and login.

Next, you will configure your installation and install some apps.

Building an AWS EC2 server and installing Anahita
-------------------------------------------------

[](#building-an-aws-ec2-server-and-installing-anahita)

**Prerequisites:** you need to be familiar with AWS services such as Route53, Load Balancers (ELB), EC2 Servers, Identity &amp; Access Management (IAM), and Relational Database Service (RDS).

### Installing PHP

[](#installing-php)

Amazon Linux comes with PHP pre-installed. All you need to do is to enable it using the following commands.

`sudo amazon-linux-extras enable php8.0`

`sudo yum clean metadata`

`sudo yum install php-{pear,cgi,pdo,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip}`

Now check to see if the PHP 8.0 is installed and working:

`php -v`

### Installing NGINX

[](#installing-nginx)

`sudo amazon-linux-extras enable nginx1`

`sudo yum clean metadata`

`sudo yum -y install nginx`

`sudo systemctl enable --now nginx`

`systemctl status nginx`

#### Configuring NGINX

[](#configuring-nginx)

The following is an example of a configuration file you can use for your EC2 server:

```
server {
  listen 80;
  server_name ;
  root /var/www//www;
  access_log /var/log/nginx/_access.log;
  error_log /var/log/nginx/_error.log;

  location / {
     default_type application/json;
	   client_max_body_size 50M;
	   index index.php index.html;
     try_files $uri $uri/ /index.php?$args;
  }

  charset utf-8;
  gzip on;
  gzip_comp_level 3;
  gzip_disable "msie6";
  gzip_min_length 1000;
  gzip_proxied any;
  gzip_types text/xml text/plain application/xml application/json;

  location ~ /\. {
      access_log       off;
      log_not_found    off;
      deny             all;
  }

  location = /robots.txt {
       allow all;
       log_not_found off;
       access_log off;
  }

 location ~* /(?:uploads|files)/.*\.php$ {
        deny all;
 }

  location ~ \.php$ {
	      try_files                 $uri =404;
        include                   /etc/nginx/fastcgi_params;
        fastcgi_read_timeout      3600s;
        fastcgi_buffer_size       128k;
        fastcgi_buffers           4 128k;
        fastcgi_param             SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass              unix:/run/php-fpm/www.sock;
        fastcgi_index             index.php;

	       client_max_body_size 50M;

         add_header "Access-Control-Allow-Origin" "https://" always;
         add_header "Access-Control-Allow-Methods" "GET, POST, PUT, DELETE, HEAD" always;
         add_header "Access-Control-Allow-Headers" "Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With" always;
         add_header "Access-Control-Allow-Credentials" "true" always;
  }
}

```

You can run the command `sudo nginx -s reload` every time you edit the config file for the changes to be applied.

### Installing a firewall

[](#installing-a-firewall)

`sudo yum install firewalld`

`sudo systemctl start firewalld`

`sudo systemctl enable firewalld`

`sudo systemctl status firewalld`

`sudo firewall-cmd --add-service={http,https} --permanent`

`sudo firewall-cmd --reload`

`sudo firewall-cmd --list-all`

### Configuring PHP FPM Service

[](#configuring-php-fpm-service)

Edit the `www.confi` file using vim:

`sudo vim /etc/php-fpm.d/www.conf`

```
user = nginx
group = nginx
listen = /run/php-fpm/www.sock
listen.acl_users = apache,nginx
pm = ondemand

```

Write and quite vim, and the run the following commands:

`sudo systemctl enable php-fpm`

`sudo systemctl restart php-fpm`

`systemctl status php-fpm`

### Installing PHP Composer

[](#installing-php-composer)

[Composer](https://getcomposer.org/) is a dependancy manager for PHP. This is how you install composer globally on your server:

`cd ~`

`sudo curl -sS https://getcomposer.org/installer | sudo php`

`sudo mv composer.phar /usr/local/bin/composer`

`sudo ln -s /usr/local/bin/composer /usr/bin/composer`

`sudo composer install`

### Installing and configuring Git

[](#installing-and-configuring-git)

We need git to be able to clone and pull Anahita code from the Github repository.

`sudo yum install git -y`

`git version`

#### Setup SSH key for Gihub

[](#setup-ssh-key-for-gihub)

`ssh-keygen -t ed25519 -C "yourgithubaccountemail@example.com"`

`~ssh-add ~/.ssh/id_ed25519`

`sudo cat /root/.ssh/id_ed25519.pub`

### Setting up a mail server

[](#setting-up-a-mail-server)

Anahita sends out a lot of email notifications. The best way is to use a reliable and heavy-duty mail service such as [Mailgun](https://www.mailgun.com/) or [Amazon Simple Email Service (SES)](https://docs.aws.amazon.com/ses/latest/dg/setting-up.html). Once you setup your SMTP, you need to have the following values for configuring Anahita in the next step:

- username
- password
- host
- port

### Initiating and configuring Anahita

[](#initiating-and-configuring-anahita)

You need to create a MySQL or MariaDB Amazon RDS instance. We don't cover the RDS creation and configuration in this document. Instead, you can read the AWS documentation: [Configuring an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_RDS_Configuring.html). Once you have your RDS instance ready, you need to have the following values:

- endpoint
- port
- database
- username
- password

You can test the database connection from your server using the following command:

`mysql -h  -P  -u  -p`

Enter the password, and then use standard MySQL commands to interact with the database. Once you manage to connect successfully, you can exit.

Installing Anahita on an EC2 instance is similar to [installing Anahita on a development machine](./installation-dev.md) with variations. On EC2, you can clone Anahita under the `var/www/` directory.

From the master branch of the Anahita repository:

`git clone git@github.com:anahitasocial/anahita.git `

Or from your custom Anahita project repository:

`git clone git@github.com:/.git`

Now change the permissions of your Anahita project directory:

`sudo chown ec2-user:ec2-user  -R`

Go in the directory and use composer to get all the required packages:

`cd `

`composer update`

Now initiate Anahita; the initiation process asks you for several parameters such as database info, etc. Enter all the values that the prompt message asks you:

`php anahita site:init`

Now signup for the first user account. The first user has Super Admin privileges which is the highest within an Anahita installation:

`php anahita site:signup`

#### Editing the Configuration file

[](#editing-the-configuration-file)

You can use a CLI text editor to edit the configuration.php file in the root directory. There are several parameters that you need to set in this file:

ParameterValueExample$sitenameWebsite/app nameAnahita$same\_site\_noneCookie same site none on/off0$client\_domainbase url to your client side webapp$sef\_rewriteSet this to 11$debugIf true, Anahita will operate in debugging mode0$error\_reportingUse -1 to turn it off or 30719 to show all warnings-1$cors\_enabledUse 1 and set the other cors value. This feature is best if you are using Anahita on your development machine and want to test it with a clientside app. For a production server, set the CORS in the nginx config file, instead.0$mailerWe recommend `smtp` and using an SMTP provider such as Mailgun or AWS SESsmtp$mailfromThe email address used in the 'reply to' section of your email notifications$fromnameA name that indicates where the origin of an email notification.Anahita Platform$smtp\_userYour SMTP service username$smtp\_passYour SMTP service passwordstrongpassword$smtp\_hostpath to the SMTP service hostsmtp.mailgun.org$smtp\_secureUse `ssl`ssl$smtp\_portSMTP service port587Write and quit the editor. Now you can set up an AWS Load Balancer (ELB) for your installation and point it to, for example,

### Anahita Settings

[](#anahita-settings)

Before using your Anahita for development or production server, you need to make some configurations. At this point, you need to connect to Anahita using a client-side app such as [Anahita React](https://github.com/anahitasocial/anahita-react). Once you have set up your client-side application, then you can access the *Settings* as follows:

1. Log in to your Anahita installation as a *Super Administrator*
2. On the main menu, click on the *Settings*

Here are the tabs under the Settings view:

1. **About:** has basic information about your Anahita installation, such as creators and software version.
2. **Apps:** configure installed Anahita apps for the entire site.
3. **Assignments:** configure which actors (People, Groups, etc.) can use what apps (Topics, Photos, etc.)
4. **Plugins:** configure Anahita plugins for the entire site.

### Notifications

[](#notifications)

Anahita emails out a lot of email notifications. For the email notifications to get sent out, you can set up a cron job on your server to the `yourdomain.com/components/com_notifications/process.php` file. Make sure to go to *Site Settings &gt; Apps &gt; Notifications* and set **Use Cron** to *Yes*.

There are many articles on the web to show you how to set up a cron job. Depending on your site's number of users and activity, anywhere from 15-minute to 1-hour intervals will work. You will find a suitable interval after monitoring your Anahita installation for a while.

### Installing Social Apps

[](#installing-social-apps)

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

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

`php anahita package:list`

Now 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`

Go to *Site Settings &gt; Assignments* to define whether an app should optionally or always be available on actor profiles (people, groups, etc.). If an app is optionally available, it can be enabled on each actor profile under the *Edit Profile &gt; Apps* by the actor profile admin or someone with a higher admin privilege on the Anahita installation.

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

### Amazon S3 Storage

[](#amazon-s3-storage)

In most cases, you wouldn't want to store the uploaded files on your own server. They add up very quickly, making it very difficult to maintain or migrate your Anahita installation. Anahita provides a plugin that stores all uploaded files in the AWS or [Amazon S3](https://aws.amazon.com/s3/) cloud.

Go to *Site Settings &gt; Plugins* and then from the *type* list select *Storage*. Edit and disable the *Storage - Local* plugin by clicking on its name. Edit the *Amazon S3* plugin using the following settings:

1. **Enabled:** set to *yes*
2. **The folder to store the data:** use *assets* as the default setting
3. **Bucket:** enter the name of your Amazon S3 bucket
4. **Access Key:** enter your AWS access key
5. **Secret Key:** enter your AWS secret key

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

Support
-------

[](#support)

Anahita has an active and thriving tribe of hobbyists, developers, and entrepreneurs. They are helpful and friendly. So [Join Us](https://www.Anahita.io/join)

**Please Note:** we do not answer questions in an email. If you have any questions, please join the Anahita tribe and post your questions on the [Tribe Support](https://www.anahita.io/groups/107732-tribe-support) group, where others can benefit from the answers too.

Reporting Bugs &amp; Issues
---------------------------

[](#reporting-bugs--issues)

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

- open an issue here on our repository
- start a topic on [Anahita Project](https://www.anahita.io/groups/42242-anahita-project) group
- send us a [friendly email](https://www.anahita.io/pages/contact) and tell us how to reproduce the bug

Contribute to Anahita
---------------------

[](#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. Here is a [complete guideline](https://www.anahita.io/articles/162390-contribute-to-anahita) of how you can contribute to Anahita.

Follow us, Like us
------------------

[](#follow-us-like-us)

Follow us on Instagram [anahita.io](https://www.instagram.com/anahita.io) and like our facebook page [Facebook.com/anahita.io](https://www.facebook.com/anahita.io)

Credits
-------

[](#credits)

Anahita is developed and maintained by [rmdStudio Inc.](https://www.rmdstudio.com), a software development company in Vancouver, Canada. We build client-server architecture applications for scientific, healthcare, and industrial sectors.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 81.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~63 days

Recently: every ~20 days

Total

56

Last Release

1197d ago

Major Versions

2.2.4 → v3.0.0-rc12013-08-27

3.0.4 → 4.0.02014-10-20

PHP version history (6 changes)2.2.4PHP &gt;=5.3

4.3.0PHP &gt;=5.5

4.3.3PHP &gt;=5.6

4.4.3PHP &gt;=5.6 &lt;7.4

4.6.0PHP &gt;=7.0 &lt; 8.0

v4.7.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/7592bc9926ebbe3e8c802e7390f1c11d3daa8004f3c5d25b5087f3d45279adca?d=identicon)[anahita](/maintainers/anahita)

---

Top Contributors

[![rmdstudio](https://avatars.githubusercontent.com/u/559971?v=4)](https://github.com/rmdstudio "rmdstudio (2319 commits)")[![asanieyan](https://avatars.githubusercontent.com/u/559913?v=4)](https://github.com/asanieyan "asanieyan (454 commits)")[![NicholasJohn16](https://avatars.githubusercontent.com/u/1107114?v=4)](https://github.com/NicholasJohn16 "NicholasJohn16 (53 commits)")[![kulbakin](https://avatars.githubusercontent.com/u/817433?v=4)](https://github.com/kulbakin "kulbakin (26 commits)")[![umeshgawade](https://avatars.githubusercontent.com/u/4150270?v=4)](https://github.com/umeshgawade "umeshgawade (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![jbruni](https://avatars.githubusercontent.com/u/69181?v=4)](https://github.com/jbruni "jbruni (1 commits)")[![articice](https://avatars.githubusercontent.com/u/6135211?v=4)](https://github.com/articice "articice (1 commits)")

---

Tags

actorsanahitaanahita-appsframeworkgraph-architecturehashtagsknowledge-sharinglocation-graphlocationsmentionsnotificationsopen-dataopen-scienceplatformsocial-appssocial-graphsocial-network-graphsocial-networkingframeworkplatformtagsrestfulsocial networkingknowledge networkingknowledge systemgraph architecturelocation graph

### Embed Badge

![Health badge](/badges/anahita-anahita/health.svg)

```
[![Health](https://phpackages.com/badges/anahita-anahita/health.svg)](https://phpackages.com/packages/anahita-anahita)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
