Giter VIP home page Giter VIP logo

marxist.space's Introduction

marxist.space

A ProleSoft project.

Abandoned

Please feel free to fork, use the db in your own project, or do whatever you want; I'm archiving this because I don't have the time to maintain it.

Adding Resources

First please search db.yml to make sure what you want to add isn't already in there. If it is, and you couldn't find it because the tags were incomplete or incorrect or the title or description were incorrect, please change those instead.

Otherwise, add your links to the bottom of db.yml. This is the type of a resource:

interface Resource {
  href: string
  title: string
  tags: string[]
  description?: string
}

An example would be:

resources: # this line is already there, needs to stay at the top
  - href: https://example.com
    title: Example Domain
    description: It's an Example # description is optional
    tags:
      - best
      - website

Developing

Run a local web server and open in the browser. For example, npx luvi or serve-static would work.

git clone [email protected]:prolesoft/marxist.space.git
cd marxist.space
# run your prefered local development server

Releasing

  • Merge or push changes, that's it! If making real code changes, please tag appropriately using npm version, and run npm t to double-check db.yml.

Contributing

See CONTRIBUTING and the open issues.

marxist.space's People

Contributors

aeshthetic avatar dependabot[bot] avatar dessalines avatar gnutrients avatar m-ox avatar zacanger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

marxist.space's Issues

Collection of Articles

I just uploaded a document with a lot of articles and some documentaries that I collected over the years. A lot on the Soviet Union, China and North Korea, but also more general stuff. Not sure which of this would be relevant for you, but feel free to copy anything you want.

https://0xacab.org/snippets/802

v2 UI design

Because of new features like tagging, citations, search, etc., the UI will have to change significantly. I'd like to keep the site functional without JS on the client side, so any major additions to the UI need to degrade gracefully. Dropping this requirement because it'll be painful.

Tags are messy

It would be good to go through all the current tags and remove noise and synonyms, and move the tag alias work to happen in search rather than at DB load. The goal here is that if someone clicks dprk they also get results tagged juche, or if they search for cops they'll see also results tagged police, for example.

V2 Ops

This will need a pipeline, maybe Docker build, server set up somewhere, DNS, etc.

Smarter pipeline

Is this a feature request or a bug?

Feature

Expected behavior:

The pipeline shouldn't rebuild both the client and server and restart the server if it doesn't need to. Getting the diff from the previous tag can be used to only rebuild what's necessary, or just forever restart 0 if the only thing changed was db.yml. It would also be nice to only test on PRs, to avoid re-running tests on code we already know is good once it's merged and on npm version commits.

Actual behavior:

Everything is rebuilt and restarted on every tag.

Environment info (relevant browser, OS, etc.; run npx envinfo):

N/A

Server Side Rendering

The app is mostly static right now, so it would be a good time to think about changing to SSR. This would require flattening the directory structure (which would be a good thing anyway IMO).

Related: #20, #22.

HTTP2

We should enable http2 for clients that support it.

Navigating directly to /about renders a 404

This is just a quirk of working with client-side routing, but can be fixed. Since /about is the only client-side route besides the home page right now, it's not a big deal.

Coverage + quality tracking

This should get hooked up to Codecov and Codeclimate, plus run tests on PRs and report back. Badges would be nice, too.

Flatten the DOM a bit

There are lots of wrappers cluttering up both the component structure and the actual DOM. This screenshot is one resource item. Two or three of the divs here could probably be refactored out.

image

Docker + maybe K8s deployment examples

I'm just running this the old-fashioned way, running Node on a VPS behind Nginx, but it might be nice to include a Docker build example and possibly Kubernetes deployments.

Related: #6

Deploying locally with jekyll serve does not utilize the default layout or serve the README as the index

Is this a feature request or a bug?

Bug

Expected behavior:

Cloning the repository and running jekyll serve should produce a locally hosted site identical to https://marxist.space

Actual behavior:

Cloning and running jekyll serve renders a sitemap at the index, and pages that don't have the default layout (and therefore no CSS) applied to them. Furthermore, jekyll complains about the {% seo %} on line 5 of the default layout.

Structured Data

We could add structured data for better performance and appearance in search engine results. Some examples of things we could do:

The first one would require rethinking search (see #43) to use a query string.

Validation can be done with http://linter.structured-data.org/ and https://search.google.com/structured-data/testing-tool, and should also be tested with https://www.webpagetest.org/lighthouse once it's deployed.

Plurality in tag aliases

The current tag searching just checks for s on the end, which is crappy. There are libraries out there that singularize or pluralize words, we could use one of those instead.

Mobile search/filter look and feel is awkward

On mobile widths, the tags and search are just pushed to the bottom with a jump button. This feels awkward.

It might be better to hide the tags and search completely on mobile, and have a button that toggles open a full-screen overlay that shows just the search and tags.

Data storage

We'll need some kind of data storage. It'd be nice to avoid a database and keep flat files (JSON, YAML, or TOML) in the repo so folks can still contribute easily.

Collapse sections in sidebar

Description

Since everything except the actual resource list lives in a sidebar, it's getting a little long now. Collapsible sections should be added, so users can see only tags, only search, etc.

Additional context if applicable

Client tests

There is currently only one example client test. There's a Jest + Enzyme setup ready, and most of the components can be tested pretty simply with snapshots. It would be nice to have reasonably good coverage.

Replace magnifying glass and X with SVGs

The submit/clear search buttons are a little ugly right now. Some nice SVGs that fit well with the look and feel of the site would go a long way towards making things feel more uniform.

Jest coverage in client doesn't include untested files

Is this a feature request or a bug?

Bug

Expected behavior:

Coverage should probably be in the single digits

Actual behavior:

Coverage on the client is reporting as being 100% because it's only including tested files

Environment info (relevant browser, OS, etc.; run npx envinfo):

Server tests

There's currently only one example server test. Jest setup is ready for them, it would be cool to have moderately good coverage.

Refactor out react-dev-utils

Description

react-dev-utils has some nice helpers, but no independent changelog from CRA so it's hard to update without breaking everything. We should just remove it.

Additional context if applicable

Search onchange rather than onsubmit performance and usability isn't great

Is this a feature request or a bug?

Bug

Expected behavior:

Search should work like a form, with a submit button.

Actual behavior:

Search is a debounced onchange right now. I thought this would be nice, but it feels really bad on mobile, and as the data set grows it's going to get slower and slower. This component should work more like a form.

Environment info (relevant browser, OS, etc.; run npx envinfo):

Lazy loading

Is this a feature request or a bug?

Feature

Expected behavior:

The home page should only render X amount of items (maybe 50?), and load more on scroll.

Actual behavior:

Everything in the "database" is rendered on load. This isn't a huge problem right now, but as the data grows it might become one.

I've used a few different lazy loading components and haven't really loved any of them, but it might be better now with IntersectionObserver as long as there's a good polyfill out there.

This work would probably take place in here.

New full-text search

The current search works fine given the amount of data, but as that grows it'll get pretty nasty. It could be replaced with Fuse or something similar.

Tagging System

v2 will need a way to make content sortable and searchable. I think a system of set tags would be the best option here, so you could search for documentaries and china and get a list of items tagged with both, for example.

Client performance isn't great

The React app should be profiled and improved. Removing Redux, removing Styled Components, and switching to a lighter-weight React alternative (Preact or Inferno) could all be helpful.

Media queries are mismatched

Things change at different sizes. It would be a good idea to pick one width as the "mobile" breakpoint to switch from a mobile/tablet experience to a desktop experience.

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.