Skip to content

coderkarma/codeselfstudy

 
 

Repository files navigation

Code Self Study Website

This is the new Code Self Study website.

This is an unfinished work in progress. 🚧 Attend a meetup to find out how to contribute.

Goals:

  • help people in the group find something in common to work on
  • meetup activity
  • learn Docker better

Ideas so far:

  • authenticate with the forum
  • send a coding puzzle of the day into the forum, slack, and/or the browser extension so that interested people have a common task to discuss
  • add new puzzles (links to other sites or original puzzles)
  • mark puzzles that you've completed
  • saving puzzles to do later
  • use the browser extension to add new puzzles to the database?
  • fetch puzzle by difficulty and type of problem
  • commenting? (forum integration or separate)
  • voting

Documentation

For the documentation, see the docs directory. You can write documentation in markdown and build it using mdbook.

First, make sure that mdbook is installed.

  • Install Rust.
  • Run cargo install mdbook to install mdbook.
  • Then run make docs to serve the documentation in a browser.

It's also possible to manually browse the docs/src directory without building the HTML output.

Technologies

See the docker-compose.yml file for an overview of the services that are running.

  • Gatsby + (contentful or strapi)
  • Express.js for the API ("MERN Stack")
  • Redis for session storage in Express.js
  • MongoDB for persistent storage
  • Docker for easy development and deployment
  • Web scraping tools in Elixir
  • Coming soon: a Phoenix/Postgres server

How It Works

  • Nginx serves the app in development and production, proxying to the other servers behind it. It serves on port 80, but in development, you can visit it at port 4444.
  • Gatsby serves the main pages (backed by a headless CMS)
  • Express.js is running on port 5000, mounted at /api. (/api is not visible in the Express code, so that might be confusing if you don't know to expect it. See the nginx configuration files.)
  • A Redis container will handle Express sessions (after users authenticate with the forum).
  • A MongoDB container will store the coding puzzle and user data. (This is an experiment with "MERN stack".)

General overview

Development

To run the application:

  • Be sure that you have Docker installed.
  • Start the application with Docker Compose.
$ docker-compose up --build

Then visit localhost:4444.

To shutdown the containers:

$ docker-compose down

(If you stop the containers by hitting ctrl-c, it won't remove the containers.)

To enter a running database container, find its ID:

$ docker container ps

Then, these commands:

$ docker container exec -it <container_id> sh

You get information about the volumes like this:

$ docker volume ls
$ docker volume inspect <volume_name>

LICENSES

The code is licensed under a BSD licensed (see the ./LICENSES directory). The wiki content is licensed under a Creative Commons license. See that directory for more information. Other sections of the code may have their own licenses. (Search for files named LICENSE if you want to generate a list without looking in the directories.)

About

The new Code Self Study website for 2020 🚧

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • CSS 77.0%
  • JavaScript 18.7%
  • Elixir 3.4%
  • Other 0.9%