This web application is a Salsa Blog, called Casineros Cubanos, and it's about Salsa dance and music.
It's like a micro-social network, intending to connect people who love Salsa and allow others to learn more about Cuban and Latino culture.
With this on Blog, people can share their knowledge, passion, and experience, related to Salsa music and dance. Users can create, edit and categorize posts of a related topic. Also, they can upload videos and photos, make comments on other user's articles, on the blog page.
Built with Ruby on Rails
Ruby: v~ 2.6.3
Rails: v- 5.2.6
List of GEMS:
Main gems included in this project:
kaminari
for paginationcarriewave
to handle images uploadsgeocoder
to integrate geolocation in Rails with the Google Maps APIfigaro
to handle app variables configuration for deploymentbcrypt
to secure users passwordfog-aws
to manipulate files on Amazon S3 Storageaws-sdk
to make easier the integration of AWS with Railspg
to connect the Rails app to the Postgres databaseaction-mailer
to send emails through a contact form and comments to the users
redcarpet
for markdown supportsendgrid-ruby
to send emails through Sendgrid services providerbootstrap
for some general styling
Postgres is the database used for all environments:
Development
environmentTest
environmentProduction
environment
Role | Login | Password |
---|---|---|
Admin | [email protected] | password |
Registered | [email protected] | password |
Guest / Visitor | No required |
No required |
Heroku, for the deployment of this web app:
https://casineros-cubanos.herokuapp.com/ (This version does not include the contact form view)
It sends automatic email responses to the user after submitting the form. On top of this, it will be used to send reminders and notify registered users when updates on the website are made. This works as expected in the development environment, but not in production.
As developers, we learn that every single environment behaves completely different from each other.
1.- For me, it is a real challenge to make this feature (Sendgrid
) to work in the production environment. Initially, I got a lot of errors, related to setup and invalid or expired key
but I could solve them. However, the most challenging part was to solve the error: superclass mismatch for class Category (TypeError)
which was provoked by due a typo in the class category
table, wich is associated with the other models of the app.
2.- Another significant challenge was send out emails
in production. The as the sendgrig-ruby
Gem installation was giving me a bug related with incompatibilities in some dependencies
. That issue I solved with heroku-ads-on
: "Twilio SendGrid" work-around.
It is for users to upload images. I took advantage of Carrierwave
and Minimagic
gems to accomplish it. Also to ensure that users can only upload images and no other files.
The initial intention for adding this feature in the project was only to display a static map of Lausanne with a few Salsa schools and Dance clubs in the area. However, the result is even better than my expectations because now users can:
Create new locations and save them in the database Search for places near a specific area of their choosing Interact with fully dynamic maps to Edit and Update places And navigate, zoom in, zoom out, and control the maps as they want I am really happy with this feature because it helped me to understand better the capabilities of the Geocoder gem and to improve my abilities with Javascript. It is also a really good base and experience for my future projects as a developer.
I used it to build a dynamic video player that is making use of Javascript for users to listen and watch salsa music videos.
The differences between my proposal and my final project are as the following:
I decided to apply local translations
instead of using globalize
gem for content translations. I think it's more suitable in this case to use local translations as it's a blog, and not selling products company.
I changed Facebook API
(Facebook authentication) for IFrame API
. With IFrame API I was also able to demonstrate de use of Javascript. I found IFrame API
more interesting for me to work within this project.
I included the Markdown
feature to give users more flexibility to write and preview articles and comments they make. This gem is well structured and can be configured to prevent malicious content.