Harris County SPCA
For the final module in the Flatiron School Software Engineering program, we learned React + Redux. For my project I chose to make a mock SPCA site, Harris County SPCA. I started with putting together a backend API with Rails. Cats, dogs, and applicants as my models, having controllers with index, create, show, destroy capabilities. CORS(Cross-origin resource sharing) was implemented in my Gemfile, to allow the frontend to fetch the data stored in the Rails API backend. As well as the Fast JSON API gem, to generate serializer classes for each resource object being passed to the frontend. The frontend and backend I set up as separate repositories, frontend at https://github.com/Wendyv510/harris-county-spca-frontend, and the backend at https://github.com/Wendyv510/HarrisCountySPCA-backend. For the backend I used the node module create-react-app, to generate a boilerplate version of a React application. From there I used the yarn command(similar to npm) to add react-redux, redux-thunk, and react-router-dom packages to my package.json file. Then running yarn install for all my packages, then yarn start to open in the browser at http://localhost:3000. Using the router I set my routes through their components to home, cats, dogs, apply, with applicants also being an option, but not having a link button, further would implement a administrator sign in to be able to access the applicants information.
<Route exact path=”/” component = {Home}/> <Route exact path=”/cats” component = {CatsContainer}/> <Route exact path=”/dogs” component = {DogsContainer}/> <Route exact path=”/applicants” component = {ApplicantsContainer}/> <Route exact path=”/apply” component = {ApplicantForm}/>