[WIP] Organize your book reading in a beautiful way
Librarium is a minimal, focused book catalog web app. It helps you track your reading and learn from it.
“I cannot remember the books I have read any more than the meals I have eaten; even so, they have made me.” — Ralph Waldo Emerson
Librarium helps you gain new insights and actionable knowledge from what you read. It helps you track what books you're reading and want to read. You can also use it to augment (coming soon) your notes & highlights with contextual information and relationships. That helps you find those valuable pieces of information at the intersection of ideas.
Librarium is currently under heavy development while working towards a first public release, which includes basic reading tracking functionalities.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on your own system.
Before we can get started with setting up the environment, it's important to understand the repository. It's a monorepo managed with Lerna. Currently, it contains the following three packages:
All packages are deployed with either AWS Amplify (
client) or the Serverless framework (
api). As such, each packages contain some code as infrastructure and deployment configuration.
This is the project website. From a technical perspective, it's not that interesting.
Production endpoint: https://www.librarium.app
client package contains the front-end in React. It's written in TypeScript. Global state is provided via Context where need be. Hooks are used throughout. One of the highest priorities for the
client package is to increase test coverage, which is lacking.
Production endpoint: https://use.librarium.app
This is the GraphQL API. It's a monolithic AWS Lambda function made with Apollo and written in TypeScript. It queries and modifies data directly from an
AWS DynamoDB table, using the
aws-sdk. Two big priorities are to reduce database overfetching by making more efficient queries, and simplifying the schema, which is unnecessarily complex.
Production endpoint: https://api.librarium.app/v1/graphql
"That's enough blabla, just tell me how to set it up!"
Alright! I'm sorry. Let's get started.
- Node >= v10.15.0
- npm >= 6.7.0
This project is managed with Lerna. Lerna makes installing dependencies for a monorepo a breeze. Make sure you have cloned the repository.
From the root project directory, execute:
npx lerna bootstrap
That's it. You're done.
Make the engines roar
The only dependency for starting up the software locally, is that the
api needs to be running before the
- Start the
apiby executing the following from the
sls dynamodb install npm start
This will compile
.ts files, install a local
DynamoDB database, seed the database, and connect it to the GraphQL server running on
- Now start the client by executing the following from the
REACT_APP_GRAPHQL_ENDPOINT=http://localhost:4000/graphql npm start
You should now be able to open the React application, that's connected to the local database, on
Running the tests
Each package contains it's own tests. At the moment, there are no e2e tests between packages. Running tests is as simple as running
npm run test in each package directory.
This project is not self-hostable. It is, however, self-deployable to AWS. All you need is an AWS and Serverless account. While it's self-deployable, it depends on some intricate undocumented details in AWS resource configuration. So, it's not recommended. I'd like to make it easier in the future.
What follows is a list of AWS resources being used on the production Librarium AWS account, detailed per package:
website with AWS Amplify:
- AWS S3
- AWS Cloudfront
- AWS Route53
- AWS Certificate Manager
client with AWS Amplify:
- AWS S3
- AWS Cloudfront
- AWS Cognito
- AWS Federated Identities
- AWS IAM
api with Serverless framework:
- AWS API Gateway
- AWS Lambda
- AWS Cloudfront
- AWS DynamoDB
- AWS X-Ray
- AWS stuff
- Styled Components
- more stuff
Do you like to read books and care about personal development? Feel free to help out! I plan to make a contribution guide, and label/detail issues in a way that makes it easier to co-operate.
SemVer is planned, but not used yet.
This project is licensed under the GNU Affero General Public License v3.0 License - see the LICENSE file for details