Skip to content

shawnpyates/MD-Flashcards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MD Flashcards (API)

API for a web application that enables users to create flashcards that support markdown and code snippets.

Demo version available here (it may take a minute to load).

React frontend using this API can be found here.

To run locally:

  1. Install dependencies: mix deps.get

  2. You will need to run your own local Postgres database and to fill out the database configuration in config/dev.exs accordingly.

  3. Create and migrate your database: mix ecto.steup

  4. You will need to run a frontend locally using the instructions here.

  5. This app uses OAuth for user authentication. You will need to create your own OAuth app for either Google or Github.

  6. Create a root-level .env file that contains the following credentials:

      export GOOGLE_CLIENT_ID=your_google_client_id
      export GOOGLE_CLIENT_SECRET=your_google_client_secret
    
      export GITHUB_CLIENT_ID=your_github_client_id
      export GITHUB_CLIENT_SECRET=your_github_client_secret
    
      # must match exactly the URL of your local frontend
      export ALLOWED_ORIGIN_URL=your_frontend_url
    
  7. Source your .env file so that the server process can read it: source .env

  8. Start the Phoenix server: mix phx.server

To seed database locally (creates users, card groups, card sets, and cards):

mix run priv/repo/database_seeder.exs

To run tests:

mix test

About

Flashcards that support MD code snippets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages