Tribe Support

In this group #Anahita Tribe members provide support and help each other out. All posts should be public in this group. #support

Stories

Rastin Mehr

Rastin Mehr commented on the topic

Nginx configuration

Dear Rustin, Hope you are doing good.

installed the anahita on nginx and pointed the server root to /anahita/www folder.

I am able to load the index page. while when i click on the login button on th...

Read More

Dear Rustin, Hope you are doing good.

installed the anahita on nginx and pointed the server root to /anahita/www folder.

I am able to load the index page. while when i click on the login button on the top right, i get a 404 error.

searched the blog and found the following

"

var $sef_rewrite = '1';var $caching = '0';var $debug = '1';Donephp anahita site:symlinkDonenginx restart cache clearDone.

"

implemented this but still no luck

also added this to the nginx default try_files $uri $uri/ /index.php?$args;

no luck.

I am forgetting some thing else

Your help will be really appreciated.

Many thanks in advance

Regards

Read Less
Is this what you have?

Loading ...
Akgora Flip

Akgora Flip started a topic

Nginx configuration

Dear Rustin, Hope you are doing good.

installed the anahita on nginx and pointed the server root to /anahita/www folder.

I am able to load the index page. while when i click on the login button on th...

Read More

Dear Rustin, Hope you are doing good.

installed the anahita on nginx and pointed the server root to /anahita/www folder.

I am able to load the index page. while when i click on the login button on the top right, i get a 404 error.

searched the blog and found the following

"

var $sef_rewrite = '1';var $caching = '0';var $debug = '1';Donephp anahita site:symlinkDonenginx restart cache clearDone.

"

implemented this but still no luck

also added this to the nginx default try_files $uri $uri/ /index.php?$args;

no luck.

I am forgetting some thing else

Your help will be really appreciated.

Many thanks in advance

Regards

Read Less
Rastin Mehr

Rastin Mehr commented on the topic

Rename Email Label

Hi Rastin, hope you are doing well...!!!

Here is another query regarding changing/renaming labels while sending mails.  Could you help me out on this on how to rename or change Anahita labels in Ema...

Read More

Hi Rastin, hope you are doing well...!!!

Here is another query regarding changing/renaming labels while sending mails.  Could you help me out on this on how to rename or change Anahita labels in Email templates and related files.

Thanks in advance

Read Less
What are the labels or templates that you want to change?
Akgora Flip

Akgora Flip started a topic

Rename Email Label

Hi Rastin, hope you are doing well...!!!

Here is another query regarding changing/renaming labels while sending mails.  Could you help me out on this on how to rename or change Anahita labels in Ema...

Read More

Hi Rastin, hope you are doing well...!!!

Here is another query regarding changing/renaming labels while sending mails.  Could you help me out on this on how to rename or change Anahita labels in Email templates and related files.

Thanks in advance

Read Less
Akgora Flip

Akgora Flip commented on the topic

Addiition of extra field of phone number in signup

Hi Rastin, hope you are doing well...!!!

I would like to add extra filed of phone number to signup, as i am using this as api for mobile app.  Could you walk me through on how to implement it .

Sure Thanks..Rastin..!!!
Akgora Flip

Akgora Flip and Rastin Mehr commented on the topic

Addiition of extra field of phone number in signup

Hi Rastin, hope you are doing well...!!!

I would like to add extra filed of phone number to signup, as i am using this as api for mobile app.  Could you walk me through on how to implement it .

Hi Rastin, hope you are doing well...!!!
We successfully implemented mobile number authentication with OTP as discussed in our previous discussion. But now we have a query regarding forgot password using mobile numb... Read More
Hi Rastin, hope you are doing well...!!!
We successfully implemented mobile number authentication with OTP as discussed in our previous discussion. But now we have a query regarding forgot password using mobile number. Could you help us out on this. Read Less
We are going to re-work the signup and password reset workflows and make it simpler. It is under active development because we need it too for our projects. Would you be able to wait for that feature? It's going to be... Read More
We are going to re-work the signup and password reset workflows and make it simpler. It is under active development because we need it too for our projects. Would you be able to wait for that feature? It's going to be available in the 4.4.5 or 4.5.0 release, depending on how we decide to name it. Right now we're trying to have 4.4.4 out sooner because it contains REST API for the com_settings.

In the meantime, start a new topic and ask your question about password recovery. I might be able to help you. Read Less
Rastin Mehr

Rastin Mehr and Akgora Flip commented on the topic

Addiition of extra field of phone number in signup

Hi Rastin, hope you are doing well...!!!

I would like to add extra filed of phone number to signup, as i am using this as api for mobile app.  Could you walk me through on how to implement it .

So you need to create a new user plugin and install it on Anahita. Then in the method onAfterAddPerson, you get a $person object from Anahita after she creates a new person object is vial signup or when an admin adds ... Read More
So you need to create a new user plugin and install it on Anahita. Then in the method onAfterAddPerson, you get a $person object from Anahita after she creates a new person object is vial signup or when an admin adds a new user, which also contains the email address.

https://github.com/anahitasocial/anahita/blob/master/src/plugins/user/anahita.php#L23

You can obtain the phone number from the POST request, then implement the Authy workflow to create an Authy user account and capture the user id:

https://www.twilio.com/docs/authy/api?code-sample=code-step-1-create-an-authy-user-2&code-language=PHP&code-sdk-version=default

Once you have the user id you can store it in the Anahita person object for later use. Just do $person->setValue('authy_id', 123)->save();

I haven't tried this, but in theory, this should work. First, start with building a basic my_authy package that contains your two plugins and a component. Try installing your package and get a hello world from it. Then make it work with Twillo API. You need to do some try and error and debugging. Look into the existing plugins to get an idea of how to implement your own. You can learn a lot of Anahita development by reading the code in the current packages and asking questions.

You can store phone number in the person object too $person->setValue('phone', $phone_number)->save(); but you don't need to. It's Authy that stores phone numbers and uses them for sending text messages. Read Less
Akgora Flip liked this
Thanks Rastin, we just gone through it, as installing package does it require running composer, could you elaborate on that.
Rastin Mehr liked this
Installing Anahita requires composer which is basically a PHP package manager. For Anahita packages you can use:

$php anahita package:install

in the command line. Make sure to become familiar with installing an... Read More
Installing Anahita requires composer which is basically a PHP package manager. For Anahita packages you can use:

$php anahita package:install

in the command line. Make sure to become familiar with installing and configuring Anahita and how the packages install and uninstall. Then gradually build your own hello world packages. There is an example in the anahita-standard repository. Read Less
Akgora Flip liked this
Thanks Rastin for your quick response, will try this and let you know if we have any issues.
Rastin Mehr liked this
No problem, good luck, let me know how it goes!
Akgora Flip liked this
Akgora Flip

Akgora Flip commented on the topic

Addiition of extra field of phone number in signup

Hi Rastin, hope you are doing well...!!!

I would like to add extra filed of phone number to signup, as i am using this as api for mobile app.  Could you walk me through on how to implement it .

Hi Rastin that was informative as well, i really appreciate your quick response extending your support to our queries. Regarding the suggestion of user plugin(Authy) i am little confused on how to build a user plugin,... Read More
Hi Rastin that was informative as well, i really appreciate your quick response extending your support to our queries. Regarding the suggestion of user plugin(Authy) i am little confused on how to build a user plugin, it would be very helpful if you walk us on that mobile number issue in detail step by step. Also as an alternative can we store that field (Please select a unique username) on signup page with number replacing the string though it is VARCHAR in DB, but i think that is being validated in other function/page to store as string in DB could you help us on this. Read Less
Rastin Mehr

Rastin Mehr commented on the topic

Addiition of extra field of phone number in signup

Hi Rastin, hope you are doing well...!!!

I would like to add extra filed of phone number to signup, as i am using this as api for mobile app.  Could you walk me through on how to implement it .

Fork the Anahita standard repo and use it for developing your custom project:

https://github.com/anahitasocial/anahita-standard

You will be building your apps in the packages directory and maintain them in your ... Read More
Fork the Anahita standard repo and use it for developing your custom project:

https://github.com/anahitasocial/anahita-standard

You will be building your apps in the packages directory and maintain them in your fork. The best reference is the existing Anhaita packages. They contain most case scenarios that you might need:

https://github.com/anahitasocial/anahita/tree/master/packages

If not, also look into the Anahita's core code in the src/components and src/plugins directory.

Don't invest in building any HTML rendering views. We are going to remove them all. Use Anahita only as an API backend. We keep improving the API right now and updating the master branch. Read Less
Akgora Flip

Akgora Flip commented on the topic

Addiition of extra field of phone number in signup

Hi Rastin, hope you are doing well...!!!

I would like to add extra filed of phone number to signup, as i am using this as api for mobile app.  Could you walk me through on how to implement it .

Hi Rastin,

That was really informative. I have another query regarding how to write customized API endpoint as per requirement. Is there any standard protocol to write it on own could you walk us through this in ... Read More
Hi Rastin,

That was really informative. I have another query regarding how to write customized API endpoint as per requirement. Is there any standard protocol to write it on own could you walk us through this in detail. Read Less
Rastin Mehr liked this
Rastin Mehr

Rastin Mehr commented on the topic

Addiition of extra field of phone number in signup

Hi Rastin, hope you are doing well...!!!

I would like to add extra filed of phone number to signup, as i am using this as api for mobile app.  Could you walk me through on how to implement it .

This is a feature that needs to be in the core code. If you add it yourself, then you'll have a hard time upgrading to the future releases of Anahita. I'm going to add the phone number field(s) in the next release. Fo... Read More
This is a feature that needs to be in the core code. If you add it yourself, then you'll have a hard time upgrading to the future releases of Anahita. I'm going to add the phone number field(s) in the next release. For the time being, you can work on the other features of your projects until we get the next release out within the next couple of weeks. Read Less
Ok, so I just looked at the Twilio Authy Users API. I don't think we even need to store phone numbers in Anahita, but we need to store the authy_id in the Anahita person node for later use. So in theory you need to de... Read More
Ok, so I just looked at the Twilio Authy Users API. I don't think we even need to store phone numbers in Anahita, but we need to store the authy_id in the Anahita person node for later use. So in theory you need to develop an Anahita user plugin and an authentication plugin. You can name both TwilioAuthy or TAuthy

In your user plugin:

1. when signing up a user for the first time in Authy user plugin method onAfterAddPerson you can register a new user with the Authy API and obtain an authy_id, then store it in the Anahita person object for later use $person->setValue('authy_id', 123)->save();

2. in order to send a one-time password request to Authy, you need to build an Anahita app called com_authy with an endpoint that loads person object by email or username and then obtains authy_id $person->getValue('authy_id'); and this triggers an SMS message or push-notification to be sent to the phone.

3. in the TAuthy authentication plugin, obtain the person object and authy_id value as well as the Authy token sent to the phone and make a call to Authy API to verify the user. If TRUE, then log in the user.

Basically it is the Twilio Authy that stores phone numbers, not Anahita. Which is more secure when you think about it.

These are example Anahita plugins for you to look into:

https://github.com/anahitasocial/anahita/tree/master/src/plugins/user

https://github.com/anahitasocial/anahita/tree/master/src/plugins/authentication

#Twilio #Authy Read Less
Akgora Flip liked this
Akgora Flip

Akgora Flip started a topic

Addiition of extra field of phone number in signup

Hi Rastin, hope you are doing well...!!!

I would like to add extra filed of phone number to signup, as i am using this as api for mobile app.  Could you walk me through on how to implement it .

Rastin Mehr

Rastin Mehr and Andre Grueter commented on the topic

Docker Kubernetes

When will Anahita be production ready/optimized for scalable ‘microservices’ type Docker Kubernetes deployments? 

Is there a PHP library that allows basic operations on an existing NFS storage infrastructure? You should be able to develop a storage Anahita plugin and use it.
Andre Grueter liked this
Yes, I think there are some various libraries. Thanks for that input. I will have a look on this. Our current roadmapp looks like we start mid of July to play around with Anahita and qTeams.io
Rastin Mehr liked this
Sounds good. Here is the path to the storage plugins https://github.com/anahitasocial/anahita/tree/master/src/plugins/storage

You can develop one for the NFS and see how it works out. We're most likely going to k... Read More
Sounds good. Here is the path to the storage plugins https://github.com/anahitasocial/anahita/tree/master/src/plugins/storage

You can develop one for the NFS and see how it works out. We're most likely going to keep the storage plugins in the future revisions of Anahita. Read Less
Rastin Mehr

Rastin Mehr and Andre Grueter commented on the topic

Docker Kubernetes

When will Anahita be production ready/optimized for scalable ‘microservices’ type Docker Kubernetes deployments? 

@angrueter I've never even considered NFS. Why do you want to use it? Is it better?

There is no API documentation. The example apps are a reference for developing additional apps. For REST APIs, you can look into t... Read More
@angrueter I've never even considered NFS. Why do you want to use it? Is it better?

There is no API documentation. The example apps are a reference for developing additional apps. For REST APIs, you can look into the React App API https://github.com/anahitasocial/anahita-react/tree/master/src/api that gives you an idea of how to communicate with Anahita. We would rather invest the time into finishing the React App and then removing the HTML views from Anahita. Considering that all these changes are going to happen, there is no point in writing documentation for the existing point. Most developers can already figure out how to build apps for Anahita using existing apps.

We can still use AWS in microservices. Read Less
Thanks. NFS Storage is for example very useful, if you don't want to send your Pictures and Data directly to the Amazon Storage for Privacy Reasons. Lets asume you have own infrastructure, and for Storage Nodes a CEPH... Read More
Thanks. NFS Storage is for example very useful, if you don't want to send your Pictures and Data directly to the Amazon Storage for Privacy Reasons. Lets asume you have own infrastructure, and for Storage Nodes a CEPH Cluster, which gives you less costs then an AmazonS3 Storage and the benefit of Data Control, then NFS can be very very usefull, you add it by an IP, Gateway and Username and Password, where the Server can store movies, pictures, files over the LAN or Peering Connection between two datacenters on a 20GB/s LAN Link. Read Less
Its also a Speed / Performance increase, using NFS and Local Storage, if you can afford a few bucks monthly.
Andre Grueter

Andre Grueter commented on the topic

Docker Kubernetes

When will Anahita be production ready/optimized for scalable ‘microservices’ type Docker Kubernetes deployments? 

I have a few Questions to Rastin,

a) Beside of AWS Storage, is NFS Storage supported ?
b) Is there a bit more of a browsable API Documentation available ( Checked on Github)

So, in my case, I have a own gitlab ... Read More
I have a few Questions to Rastin,

a) Beside of AWS Storage, is NFS Storage supported ?
b) Is there a bit more of a browsable API Documentation available ( Checked on Github)

So, in my case, I have a own gitlab and ci server. Dockerizing this as MicroService would mean: MSQL Container, WebServer with WebApp (React) Container, Storage Container distributed to a NFS CEPH Cluster. Right ? Read Less
Rastin Mehr

Rastin Mehr and Akgora Flip commented on the topic

Any one able to edit avatar from reactjs

Dear Ppl,

i was trying to edit avatar from client reactJs + ionic  mobile and on android device.

here the end point is 

End - point  - http://fiti2.v2code.xyz/people/2.json?edit=avatar  

Method is...

Read More

Dear Ppl,

i was trying to edit avatar from client reactJs + ionic  mobile and on android device.

here the end point is 

End - point  - http://fiti2.v2code.xyz/people/2.json?edit=avatar  

Method is Post 

as a super admin

potrait - data:image/jpeg;base64, /jjjjjjahsdjafg data..... 

I get the following

{"code":401,"message":"Action Edit Not Allowed"}

though I am logged in to my mobile app. 

can you please guide me where am i doing wrong.. 

Thanks In Advance 

and Best Regards

Read Less
Can you edit the avatar from the React App on the same setup?
Also is content-type multipart/form-data ?
Can you edit the avatar from the React App on the same setup? - yes
Also is content-type multipart/form-data ? Yes.
I am checking on my server side.
one question do we need to send any token to validate the session?
Can your mobile app hold sessions? Check every bit of information that the React App sends to the back-end and compare it with your mobile app's request.
I doubt the same and i am working on it.
Thanks for your time Rastin.
PS: did you get any time to add the mobile number feilds to the DB
Rastin Mehr liked this
I am working on the locations tag in the React App. After that, I'll look into adding the phone number fields.
Akgora Flip liked this
Great Thanks a lot
Hi Rastin
Fixed the issue ,
The issue was with the blob file.
converted the file to blob in srcapiavatar.js and is fixed

let blob = await fetch(file).then(r=r.blob());
formData.append('portrait', blob, 'f... Read More
Hi Rastin
Fixed the issue ,
The issue was with the blob file.
converted the file to blob in srcapiavatar.js and is fixed

let blob = await fetch(file).then(r=>r.blob());
formData.append('portrait', blob, 'file1.jpg'); Read Less
Akgora Flip

Akgora Flip started a topic

Any one able to edit avatar from reactjs

Dear Ppl,

i was trying to edit avatar from client reactJs + ionic  mobile and on android device.

here the end point is 

End - point  - http://fiti2.v2code.xyz/people/2.json?edit=avatar  

Method is...

Read More

Dear Ppl,

i was trying to edit avatar from client reactJs + ionic  mobile and on android device.

here the end point is 

End - point  - http://fiti2.v2code.xyz/people/2.json?edit=avatar  

Method is Post 

as a super admin

potrait - data:image/jpeg;base64, /jjjjjjahsdjafg data..... 

I get the following

{"code":401,"message":"Action Edit Not Allowed"}

though I am logged in to my mobile app. 

can you please guide me where am i doing wrong.. 

Thanks In Advance 

and Best Regards

Read Less
Rastin Mehr

Rastin Mehr and Akgora Flip commented on the topic

Want to add mobile number for signup and sign in process

Dear People,

Here I am developing a mobile application based on anahita backend.

I want to use mobile number for signup and sign in process, later will use mobile verification for signup 

can you ple...

Read More

Dear People,

Here I am developing a mobile application based on anahita backend.

I want to use mobile number for signup and sign in process, later will use mobile verification for signup 

can you please help me where can I take care of the new fields after I  add it to the DB..

Any clues or insights would be very help full.

Thanks in Advance and Kind Regards

Read Less
I was thinking of adding a phone number and area code to the people_people table in the database but keep it optional. There will be no fields in the signup and account forms, but third-party developers can use the fi... Read More
I was thinking of adding a phone number and area code to the people_people table in the database but keep it optional. There will be no fields in the signup and account forms, but third-party developers can use the field for their own projects without having to make modifications to the core codebase.

Then you can develop some custom Anahita plugins to integrate with an external platform that sends a code via text message or push-notification and then you can use the code to authenticate the user.

Right now we don't want to add any new features to Anahita, especially if it requires building new user interfaces. That is until the React app is ready and we convert Anahita into an API-only service. Also, these external services don't pass the privacy compliance for scientific and healthcare projects that we do, so it is unlikely that we develop and maintain the code for it. You need to build authentication with a phone number on your own for now.

Did you have any particular service in mind? Read Less
Thanks for you reply,
At the moment thinking of Twilio OTP service.
we integrate this Service in our mobile app to verify the mobile number with OTP.
Then post the mobile number, username, email to the back-end .... Read More
Thanks for you reply,
At the moment thinking of Twilio OTP service.
we integrate this Service in our mobile app to verify the mobile number with OTP.
Then post the mobile number, username, email to the back-end .

once you add the mobile number to the database, can we use the mobile number as optional to sign in with API? Read Less
I can add the phone number and area code fields in the people_people table. You need to implement the Twilio integration plugins yourself. You can publish them on Github for others to use as well. I should be able to ... Read More
I can add the phone number and area code fields in the people_people table. You need to implement the Twilio integration plugins yourself. You can publish them on Github for others to use as well. I should be able to have the fields in one of the next two releases. I can't promise a time though. Read Less
Great, Twillo integration is on the client side. I will publish it once am i done.
can you please tell me where do we handle the validations for signup in the back-end?
for the moment i want to use the username fi... Read More
Great, Twillo integration is on the client side. I will publish it once am i done.
can you please tell me where do we handle the validations for signup in the back-end?
for the moment i want to use the username field to allow only numbers , so i can use it as a mobile number for signing to the api. Read Less
Rastin Mehr

Rastin Mehr and Akgora Flip commented on the topic

How to upload photo with a caption from anahita React

Dear Rastin,

I was working on a mobile app with reactjs + ionic frame work using th e anahita as back-end service.

Here i have built an interface to capture a photo with camera . now i need to upload...

Read More

Dear Rastin,

I was working on a mobile app with reactjs + ionic frame work using th e anahita as back-end service.

Here i have built an interface to capture a photo with camera . now i need to upload it to back-end, which service API can i use to upload the photo.

Could you please help me on this

Thanks In Advance

#photos #upload #ReactJS

Read Less
I haven't implemented media composers in the react app yet. Though you can still look at the avatar upload, that might give you a clue.

container: https://github.com/anahitasocial/anahita-react/blob/master/src/con... Read More
Akgora Flip liked this
In the existing back-end code, this is where photo upload via the composer is happening. It is fairly basic: https://github.com/anahitasocial/anahita/blob/master/packages/Photos/src/components/com_photos/views/photo/h... Read More
In the existing back-end code, this is where photo upload via the composer is happening. It is fairly basic: https://github.com/anahitasocial/anahita/blob/master/packages/Photos/src/components/com_photos/views/photo/html/composer.php Read Less
Thanks For your Quick Reply ,
I will take a look at it
Rastin Mehr liked this
Akgora Flip

Akgora Flip started a topic

How to upload photo with a caption from anahita React

Dear Rastin,

I was working on a mobile app with reactjs + ionic frame work using th e anahita as back-end service.

Here i have built an interface to capture a photo with camera . now i need to upload...

Read More

Dear Rastin,

I was working on a mobile app with reactjs + ionic frame work using th e anahita as back-end service.

Here i have built an interface to capture a photo with camera . now i need to upload it to back-end, which service API can i use to upload the photo.

Could you please help me on this

Thanks In Advance

#photos #upload #ReactJS

Read Less

Photos View All

Articles View All

Topics View All

Powered by Anahita