A gallery site for images recreated using a genetic algorithm.
This app is now deployed at geneticgallery.herokuapp.com!
This is a side project inspired by Roger Alsing's Mona Lisa, though his implementation seems to be closer to stochastic hill-climbing than to a model of natural selection. Genetic Gallery is a place to create and share a specific kind of computer-generated art. Users can upload images of their choice and generate geometric approximations of them using a genetic algorithm. These approximations are 'evolved' from scratch; every creation is 100% unique!
Built on React, Node, Express, and PostgreSQL/Sequelize.
I also used this project to learn the Jest testing framework and Flow.js, a static type checking library.
This project uses CSS Modules. Styles are colocated with their respective components, and rules are brought into components through destructured imports.
Make sure Postgres is installed. This app will attempt to create a database named 'genetic-gallery.' The app will still run without Postgres, but you will not be able to submit and view created images.
From the project directory, you can use yarn or npm to run:
Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches an interactive test runner in the console.
Type 'a'
in the runner to see all existing tests.
This project uses Jest, along with Enzyme to help with React Component testing.
Builds the app for production to the build
folder.
The build is minified and the filenames include the hashes.
Runs flow to type check any files annotated with the @flow
comment:
// @flow
function annotatedCode(here: string) {...}
This project is configured to give on-the-fly flow hints via ESLint, so this script should be unnecessary in most cases.