Website: https://codexappaa.herokuapp.com/
CodeX is an online publishing platform, for members of the tech industry, inspired by Medium.com. On it, you can write, read, and connect with others, on such topics as:
- software engineering
- computer science
- data science
- machine learning
- and more.
The codex, a bound collection of handwritten contents on non-paper materials, is the historical ancestor of the modern book. Conveniently, for our purposes, its pronunciation and spelling imply exchange of information, and echo computer code, prominent features of innovation and technology.
- JavaScript
- Express
- Pug
- CSS
- BCrypt
- Heroku
- Sequelize
- PostgreSQL
The feed features stories from users that you follow, and recommended stories.
Demo account also available
- Comments section - authenticated users can add comments to a story
- Follow / unfollow a user
- Like / unlike
- Authenticated users can like or remove their like on the story
- Authenticated users can like or remove their like on comments
- Live updates for comments, follows, and likes.
Authenciated users can post new stories. Body text input supports Markdown
The authenticated user can also edit stories
- Infinite scroll
let offset = 6;
//Infinite scroll
const bottomObserver = new IntersectionObserver( async (entries,observer) => {
entries.forEach(async(entry) => {
let url = '/api/stories?offset=' + offset;
if(entry.isIntersecting ){
let getPosts = await fetch(url).then(res => res.json());
offset += 6;
constructPost(getPosts,'.pContainer');
}
})
},{threshold:1})
/*
makes sure the element being observed exists
*/
if(background) observer.observe(background);
if(bottom) bottomObserver.observe(bottom);
Quite cool, isn't it?
- Markdown support for story pages
- Category tags
- Infinite scroll implementation for comments
- Recommended follows algorithm
- based on current follows
- using breadth-first search
- Search bar
- Trending stories
- User profile pages
npm install
- Install postgres
- Create a database called
codex_app
- Set password as 'password' or any password. Note: make sure it is the same password as the one in the .env file variables
- Create a new env file. Use
.env.example
as a reference. - Run migrations:
npx dotenv sequelize db:migrate
- Run seed data for testing:
npx dotenv sequelize db:seed:all
- Start the server:
npm start