canberkvarli / sonar

A SoundCloud clone web application built with React/Redux and Rails
0 stars 0 forks source link
heroku javascript postgresql react redux

SONAR

Sonar (currently not avaliable for live) is a web page, clone of SoundCloud built with Ruby on Rails, ReactJS, and Redux. On Sonar, artists are able to upload their tracks for the world to stream, share, and like.

Sonar Home Page

Technologies

Sonar was built using Rails for the backend, React/Redux for the frontend. Database was managed by PostgreSQL and Wavesurfer.js library which is built on top the Web Audio API and HTML5 Canvas to build the web audio waves.

Features

Track Show & Waveform

Sonar Track Page

Search


handleChange(e) {
        let currList = [];
        let newList = [];

        if (e.target.value !== "") {
            currList = this.props.tracks;
            newList = currList.filter((track) => {
                let lowerCaseTrack;
                // ensure of an object
                typeof track == "object"
                // lower case mandatory
                    ? (lowerCaseTrack = track.title.toLowerCase())
                    : (lowerCaseTrack = track.toLowerCase());
                let filter = e.target.value.toLowerCase();

                return lowerCaseTrack.includes(filter);
            });
        } else {
            newList = this.props.tracks;
        }
        this.setState({
            filtered: newList,
        });
    }

Sonar Tracks

Future Implementations

Note: docker-compose run, bundle exec rails server -p 3001

root.html.erb (missing partial error workaround fix)

window.currentUser = <%= render("api/users/user.json.jbuilder", user: current_user).html_safe %> Removing the above line from root.html.erb ln:3 is a workaround for jbuilder partial error.