Welcome to our docs. Whether you want to use our APIs, know the inner workings of our applications, or just anything, you've come to the right place. Let's learn and improve together.
Create the world out of the things that you build. We build those things and will set them free. We also write thoughts and much more.
Our mission is to connect and build a free, open, and privacy-respected open-source world that can improve humans life and beyond. We believe in our saying, Human’s power is their power, and not the brand’s power.“
Our vision is to empower every person on this planet (and beyond) to use free, open and privacy-respected solutions, and we intend to connect with them to spread happiness.
We know our motto, mission, and vision are vague, but hey, does that even matter? Let’s dive in straight on what we’ve got for you:
Desityle is a sleek and straightforward DIY CSS framework built from scratch with DIY(Do It Yourself) concept in mind.
You’ve made an excellent decision to give desityle a try. It’s super-duper easy to integrate desityle in your websites.
Using CDN:
Just include our CSS and JS CDN files in your index.html
(or any other .html
file):
html
Using in React or other JS Libraries/Frameworks:
First, install desityle using NPM or Yarn:
bash$ yarn add desityle@1.1.5
# or
$ npm install desityle@1.1.5 --save
Then Import in your libraries:
javascriptimport 'desityle/build/css/desityle.min.css';
Currently, there is no way to import JS using libraries/framework; we’re actively working on it.
You can contribute to this project, but first, you’ll need to set up your machine.
Clone this repo and cd into it:
bash$ git clone https://github.com/drabkirn/desityle.git
$ cd desityle
Install all dependencies:
bash$ yarn install --check-files
All our source code is located in src/
folder.
bash$ cd src/
Make changes or tweak some bugs in this folder, meanwhile you can run a simple server to see your changes:
bash# Example, to start on localhost:3002 or YOUR_IP:3002
$ python -m SimpleHTTPServer 3002
After making changes, you can look the final look of your changes by building the app. We use gulp
under the hood. This is exactly what our production users will see:
bash$ yarn build
# or
$ npm run build
Serve you app from the build/ folder created by the above command.
bash$ cd build
# Example, to start on localhost:3002 or YOUR_IP:3002
$ python -m SimpleHTTPServer 3002
When you think eveything is right and working smooth and well, you can checkout our contributing guide to make a pull request.
Feedka is an open-source web application that can serve as a platform to get authentic, kindful, and constructive feedback from your friends, family, and co-workers. We’re all on the same boat in just our own different ocean. Let us all get better together.
If you want to test the waters first, then you can visit the Feedka website and see it in working.
You get started by creating an account, you can then share your unique link with your friends, family, and co-workers. The bottom line points are:
/admin
UI. If the admin finds it appropriate, then the admin can send the feedback to the respective user./admin
UI. All these other reports are assigned to the admin
user only.You must have Ruby version 2.7.1
and Rails 6.0.2.2
installed. You can install them using GoRails Setup Guide.
You can install Rails 6.0.2.2
with:
bash$ gem install rails -v 6.0.2
We use MySQL as our database. You can install the same from DigitalOcean’s MySQL Setup Guide
You’ll also need Redis
, so you can install the same from their official website
That’s it, all prerequisites are now installed. Next, clone the repository and install the dependencies.
bash$ git clone https://github.com/drabkirn/feedka.git
$ cd feedka
$ bundle i
$ yarn install --check-files
Rails credentials re-setup:
There is a config/credentials.yml.enc
file, but this repo doesn’t have the master.key
, so delete this file:
bash$ rm config/credentials.yml.enc
Now to create your new rails credentials:
bash$ EDITOR=nano rails credentials:edit
Now, press ctrl + X
, then press Y
and then press Enter
to exit the nano
editor. You don’t have to change anything in your credentials, as we use figaro
gem for our credentials. Rails credentials is only needed for secret_key_base
.
Setting up the environmental variables with Figaro:
Copy the config/application-sample.yml
to config/application.yml
bash$ cp config/application-sample.yml config/application.yml
Now, let’s work on each environmental variable in development:
group of config/application.yml
:
db_hostname
, db_username
, db_password
, db_name
: Your database credentials to connect the app with the database.
app_hostname
: This should be only the domain of your app. The value could be "localhost"
or "192.168.1.1"
or "abc.com"
. Don’t add any Slashing trails.
app_port
: If your app is hosted on a separate port, then mention it here. Or else leave it blank. This could be 3000
.
app_base_domain
: This is the base URL of the application, which includes protocol. This could be "http://localhost:3000"
or https://abc.com
. Don’t add any Slashing trails.
c_name
: In long, company name. We use this name to refer to Company Name Feedka
. This value could be "Drabkirn"
or "ABC"
admin_username
: For security purposes, we don’t make the first user signing up as admin. So put the username of the admin that you’ll have after deploying and creating your admin user. This value could be "admin"
.
mailer_from_address
: Your email address that the devise mailer should use when sending the emails. This could be "admin@feedka.xyz"
.
devise_secret_key
and devise_pepper_hash
: This is a random secret that is used by devise to keep our data secure. We will generate this from securerandom
. In your terminal, open irb
and then run:
bash$ irb
## In IRB
require "securerandom"
SecureRandom.hex(64)
#=> "9f7b16e6c92f25184ef7e0698eecb295f04c1ea3bb96456d25a577eed3ba27eed831a41ae303cbc959fdf08b43fc1f43420689b0557ff95d57e53710c85cd891"
SecureRandom.hex(64)
#=> "9f7b16e6c92f25184ef7e0698eecb295f04c1ea3bb96456d25a577eed3ba27eed831a41ae303cbc959fdf08b43fc1f43420689b0557ff95d57e53710c85cd891"
exit
Put the results of SecureRandom.hex(64)
in each devise_secret_key
and devise_pepper_hash
encrypt_key
: This key is used to encrypt the feedback in the database. To generate this, open irb
like above and then run SecureRandom.hex(16)
, then paste the result of this in encrypt_key
value.
REDIS_URL
: The value of this should be "redis://localhost:6379/1"
. This is by default on which redis will run. If you have another URL, then you can change this.
content_moderation_url
: If you don’t want to use content moderation then leave this and next content_moderation_api_key
as blank (Which is not recomended). To make it working, You’ll need to signup for a free Azure account, and Content moderation has a free tier. So go to Azure portal –> New Resource –> Search for “Content Moderation” in the marketplace –> Create –> Give it a unique name, choose the Central India
region and choose your pricing tier –> Create. Wait for few seconds for the process to finish. Now this value should be "https://centralindia.api.cognitive.microsoft.com/contentmoderator/moderate/v1.0/ProcessText/Screen?autocorrect=true&PII=true&classify=True"
content_moderation_api_key
: In the above created Azure resource, goto Keys
tab from the left pane and then copy one of the keys and paste it here.
Finally, your config/application.yml
file’s development
section must look like this:
yamldevelopment:
db_hostname: "localhost"
db_username: "root"
db_password: "1234"
db_name: "feedka_development"
app_hostname: "localhost"
app_port: "3000"
app_base_domain: "http://localhost:3000"
c_name: "ABC"
admin_username: "abcd"
mailer_from_address: "abcd@localhost.com"
devise_secret_key: "9f7b16e6c92f25184ef7e0698eecb295f04c1ea3bb96456d25a577eed3ba27eed831a41ae303cbc959fdf08b43fc1f43420689b0557ff95d57e53710c85cd891"
devise_pepper_hash: "9f7b16e6c92f25184ef7e0698eecb295f04c1ea3bb96456d25a577eed3ba27eed831a41ae303cbc959fdf08b43fc1f43420689b0557ff95d57e53710c85cd891"
encrypt_key: "caa3f43897a1c31a87598a30f9ef04f0"
REDIS_URL: "redis://localhost:6379/1"
content_moderation_url: "https://centralindia.api.cognitive.microsoft.com/contentmoderator/moderate/v1.0/ProcessText/Screen?autocorrect=true&PII=true&classify=True"
content_moderation_api_key: "YOUR KEY"
Setup and migrate the database. In your terminal run:
bash$ rails db:create
$ rails db:migrate
Running the services:
Open up a new terminal to run the redis(if it’s not already running), this will fireup the redis server on localhost.
bash$ src/redis-server
We use foreman
gem for running multiple services in just one terminal. To install it run:
bash$ gem install foreman
Now we’ll fire up our rails server
on port 3002
, webpack dev server
on port 3003
and sidekiq
using:
bash$ foreman start -f Procfile.dev
Now you can see your app running on http://localhost:3002
or http://YOUR_IP:PORT
docker
and docker-compose
install.First, clone our repository and then cd
into it:
bash$ git clone https://github.com/drabkirn/feedka.git
$ cd feedka
Setting up the environmental variables with Figaro:
Copy the config/application-sample.yml
to config/application.yml
bash$ cp config/application-sample.yml config/application.yml
To know the details of these environmental variables - See Above
Finally our config/application.yml
file’s development
section should look something like this (Make sure db_hostname
is set to mysql
):
yamldevelopment:
db_hostname: mysql
db_username: root
db_password: root
db_name: feedka_development
app_hostname: "localhost"
app_port: "3000"
app_base_domain: "http://localhost:3000"
c_name: "ABC"
admin_username: "abcd"
mailer_from_address: "abcd@abcd.com"
devise_secret_key: "340a68e75c7350a8cdfe7c107ce0cfda7390b7521680b2b8c6afa88f1df149eec77b4bd6700d30b814e34a3bb6362a2c5a7d4097dafada224f57d377511d483c"
devise_pepper_hash: "2f908a14f1d8ec51fe79349fad8796a96c3321eae7ade3d5c4510250d82b45874ed7364758800a489ce503dc35e2f23dc04f560b56ed3b51d0c766770513c4f3"
REDIS_URL: "redis://redis:6379/1"
encrypt_key: "19c979eefc45bc4a712a6ca1e0dfacd5"
content_moderation_url: "https://centralindia.api.cognitive.microsoft.com/contentmoderator/moderate/v1.0/ProcessText/Screen?autocorrect=true&PII=true&classify=True"
content_moderation_api_key: "YOUR KEY"
We have docker-compose.yml
and corresponding Dockerfile
in the repo which will configure gems, redis server, MYSQL DB and webpacker. All you’ve to do is just run few commands:
bash$ docker-compose build
$ docker-compose run web rails db:setup
$ docker-compose run web rails db:migrate
$ docker-compose run web bundle exec rake assets:precompile
$ docker-compose up
docker-compose run web rails db:setup
command fails, then wait for 30 seconds and retry. This happens because mysql
image takes little time to load.Now you can see your app running on http://localhost:3000
or http://YOUR_IP:PORT
docker-compose.yml
file. But for this, you’ll need to do docker-compose down
and then run docker-compose up -d
to restart the servers.You must have Ruby version 2.7.1
and Rails 6.0.2.2
installed. You can install them using GoRails Setup Guide.
You can install Rails 6.0.2.2
with:
bash$ gem install rails -v 6.0.2
We use MySQL as our database. You can install the same from DigitalOcean’s MySQL Setup Guide
You’ll also need Redis
, so you can install the same from DigitalOcean’s Redis Setup Guide
That’s it, all prerequisites are now installed. Next, clone the repository and install the dependencies.
bash$ git clone https://github.com/drabkirn/feedka.git
$ cd feedka
$ RAILS_ENV=prodcution bundle i
$ RAILS_ENV=prodcution yarn install --check-files
Rails credentials re-setup:
There is a config/credentials.yml.enc
file, but this repo doesn’t have the master.key
, so delete this file:
bash$ rm config/credentials.yml.enc
Now to create your new rails credentials:
bash$ EDITOR=nano rails credentials:edit
Now, press ctrl + X
, then press Y
and then press Enter
to exit the nano
editor. You don’t have to change anything in your credentials, as we use figaro
gem for our credentials. Rails credentials is only needed for secret_key_base
.
Setting up the environmental variables with Figaro:
Copy the config/application-sample.yml
to config/application.yml
bash$ cp config/application-sample.yml config/application.yml
To know the details of these environmental variables - See Above, but this time work on production:
section of the application.yml
file.
In addition to above environment variables, We’ll add Sendgrid to send emails in production for user authentications. For for sendgrid environment variables:
sendgrid_api_key
: We use sendgrid to send emails. It’s free and allows upto 100 emails/day. So signup for an sendgrid account, Go to Settings –> API Keys –> Create a New Key –> Give a friendly name to your API –> Choose Restricted Access
option –> Tick the Mail Send
option from it(We will use sendgrid only to send mails) –> Create API. Now copy the API key and put it here. This value should be something like this "SG.xxxxx"
sendgrid_domain
: You might have connected your domain with sendgrid to whitelist your email domain. You can use this guide to learn more. If you’ve not set it up, leave it blank. This value could be "abc.com"
That’s it, all your environmental variables are configured. Finally, your config/application.yml
file’s development
section must look something like this:
yamlproduction:
db_hostname: localhost
db_username: root
db_password: root
db_name: feedka_development
app_hostname: "localhost"
app_port: "3000"
app_base_domain: "http://localhost:3000"
c_name: "ABC"
admin_username: "abcd"
mailer_from_address: "abcd@abcd.com"
sendgrid_api_key: "SG.xxxx"
sendgrid_domain: "abcd.com"
devise_secret_key: "340a68e75c7350a8cdfe7c107ce0cfda7390b7521680b2b8c6afa88f1df149eec77b4bd6700d30b814e34a3bb6362a2c5a7d4097dafada224f57d377511d483c"
devise_pepper_hash: "2f908a14f1d8ec51fe79349fad8796a96c3321eae7ade3d5c4510250d82b45874ed7364758800a489ce503dc35e2f23dc04f560b56ed3b51d0c766770513c4f3"
REDIS_URL: "redis://localhost:6379/1"
encrypt_key: "19c979eefc45bc4a712a6ca1e0dfacd5"
content_moderation_url: "https://centralindia.api.cognitive.microsoft.com/contentmoderator/moderate/v1.0/ProcessText/Screen?autocorrect=true&PII=true&classify=True"
content_moderation_api_key: "YOUR KEY"
Setup and migrate the database. So run the following commands in your terminal:
bash$ RAILS_ENV=production rails db:create
$ RAILS_ENV=production rails db:migrate
For production environment you should consider using something like Passenger for Ruby to handle your web app requests. You can Install and setup this app easily by following Passenger documentation.
Also, consider getting an SSL certificate from Lets Encrypt. You can do this using DigitalOcean’s SSL Setup for Apache or SSL setup for Nginx guide.
docker
and docker-compose
install.First, clone our repository and then cd
into it:
bash$ git clone https://github.com/drabkirn/feedka.git
$ cd feedka
Setting up the environmental variables with Figaro:
Copy the config/application-sample.yml
to config/application.yml
bash$ cp config/application-sample.yml config/application.yml
To know the details of these environmental variables - See Above
Finally our config/application.yml
file’s production:
section should look something like this (Make sure db_hostname
is set to mysql
):
yamlproduction:
db_hostname: mysql
db_username: root
db_password: root
db_name: feedka_development
app_hostname: "localhost"
app_port: "3000"
app_base_domain: "http://localhost:3000"
c_name: "ABC"
admin_username: "abcd"
mailer_from_address: "abcd@abcd.com"
sendgrid_api_key: "SG.xxxx"
sendgrid_domain: "abcd.com"
devise_secret_key: "340a68e75c7350a8cdfe7c107ce0cfda7390b7521680b2b8c6afa88f1df149eec77b4bd6700d30b814e34a3bb6362a2c5a7d4097dafada224f57d377511d483c"
devise_pepper_hash: "2f908a14f1d8ec51fe79349fad8796a96c3321eae7ade3d5c4510250d82b45874ed7364758800a489ce503dc35e2f23dc04f560b56ed3b51d0c766770513c4f3"
REDIS_URL: "redis://redis:6379/1"
encrypt_key: "19c979eefc45bc4a712a6ca1e0dfacd5"
content_moderation_url: "https://centralindia.api.cognitive.microsoft.com/contentmoderator/moderate/v1.0/ProcessText/Screen?autocorrect=true&PII=true&classify=True"
content_moderation_api_key: "YOUR KEY"
We have docker-compose-production.yml
and corresponding Dockerfile_production
in the repo which will configure gems, redis server, MYSQL DB and webpacker. All you’ve to do is just run few commands:
bash$ docker-compose build
$ docker-compose run web rails db:setup
$ docker-compose run web rails db:migrate
$ docker-compose run web bundle exec rake assets:precompile
$ docker-compose up
docker-compose run web rails db:setup
command fails, then wait for 30 seconds and retry. This happens because mysql
image takes little time to load.Now you can see your app running on http://localhost:3000
or http://YOUR_IP:PORT
docker-compose.yml
file. But for this, you’ll need to do docker-compose down
and then run docker-compose up -d
to restart the servers.