Giter Club home page Giter Club logo

pl406-doggo-adoption's Introduction

Dog Adoption and Care

Application where users can view dogs up for adoption/fostering, adopt/foster a dog, post about a dog available for adoption/fostering or write a post (maybe asking for help or really just anything related to dogs). Users can also choose to donate (monetarily/pet products) or volunteer for the adoption home. The application will post details about events like adoption camps. Users can also view the help section regarding locations of pet food stores, vet clinics and other doggo related information.

Build Status Deployed on Heroku

versionjava versionspringboot versionnodejs versionsvelte mongodb versionaxios versionrollup versionmoment versionmapbox versionsvelterouting jwt thymeleaf

Getting Started

  • Clone this repository.

    git clone https://github.com/rochelle-m/pl406-doggo-adoption
    
  • Create a new database in MongoDB Atlas.

    MongoDB Atlas is a hosted MongoDB service option in the cloud which requires no installation overhead and offers a free tier to get started.

  • Open the project in IntelliJ IDEA or Eclipse IDE.

    Note that you will need to have Java installed.

    Local development

  • Configure App properties: Create a file to store your application properties and environment variables src/main/resources/application-dev.properties

  • Set up Atlas Connectivity and paste in your connection string.

    spring.data.mongodb.uri=
  • Payment processing using Stripe: Create an account on Stripe and place your public and secret key pair in application-dev.properties.

    stripe.public.key=
    
    stripe.secret.key=
  • Your application-dev.properties would look something like this (Fill in the other properties).

    spring.data.mongodb.uri=
    
    spring.servlet.multipart.max-file-size=
    
    spring.servlet.multipart.max-request-size=
    
    app.jwtSecret=
    
    app.jwtExpirationMs=
    
    stripe.public.key=
    
    stripe.secret.key=
    
  • In client/ create a file .env and in it, enter your Mapbox Access Token

    API_MAPBOX_ACCESS_TOKEN=
    
  • First run

    mvn clean install
    
  • Then, run the application

    mvn spring-boot:run
    
  • Visit localhost:8080.

Deployment

  • Set the active profile to prod in src/main/resources/application.properties
    spring.profiles.active=prod
  • Set up Config vars in Heroku

APIs

Method Endpoint Description Authentication
GET /api/doggos/ Retrieves all dogs
POST /api/doggos/ Creates a new dog resource
GET /api/doggos/{id} Retrieves a dog with matching id
POST /api/auth/signup Creates a new user, returns JWT
POST /api/auth/signin Authenticates the user, returns JWT
POST /api/auth/logout Logs the user out
PUT /api/auth/update/{id}/{role} Updates the user to the VOLUNTEER role
GET /api/checkout/{amount} Redirects to the payment page
POST /api/posts/new Creates a new post
POST /api/posts/comment Creates a new comment to a post
DELETE /api/posts/{id} Deletes post by id
GET /api/products/[category-name] Retrieves products by category
POST /api/applicant/ Creates a new adoption applicant
GET /api/applicant/ Retrieves all applicants ✓*
DELETE /api/applicant/{id} Deletes an applicant by id

pl406-doggo-adoption's People

Contributors

chetana-1929 avatar git-shru avatar roch25 avatar rochelle-m avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.