- Clone it:
git clone [email protected]:on-deck/coding-challenge-newsfeed.git
- Open the folder:
cd coding-challenge-newsfeed
- Install the dependencies:
yarn install
- Run the dev server:
yarn dev
- Open http://localhost:3000
This project portrays a simplified slice of On Deck community platform.
We have users participating in three fellowships:
- Founders, modeled after the On Deck Founders program,
- Angels,
- Writers.
We want to create a newsfeed for each fellowship that shows new and relevant events. The goal is to keep users up to date and to facilitate collaboration between them.
In general, there are three types of events:
- new people (DB table
users
), - new projects (table
projects
), - team announcements (table
announcements
).
However, each newsfeed should consist of different types of content because people from different fellowships are interested in different events:
- Founders want to connect to angels and other founders.
- Angels want to connect to founders and other angels.
- Founders and angels are interested in new founders' projects.
- Writers want to connect only to other writers and are not interested in founders' projects.
Announcements can be addressed to a specific fellowship, or to all users (see table announcements
, column fellowship
). Founders are not interested in announcements addressed to writers, and so on.
Implement the newsfeed:
- It should include users, projects, and announcements.
- It should display different results, depending on the selected fellowship, as described in the "Setting" section above.
- Entries should be sorted by creation date, newer entries go first.
- Implement infinite scrolling, don't download and display all entries at once.
Tips:
- You can change any part of the application — DB connection, GraphQL server/client, styled-components — if you are more comfortable or productive with something else.
- You can change the project structure as you see fit.
- You can add any NPM package you need to implement new features or improve the existing code.
- You can reuse the existing React components, or modify them so they fit better in the newsfeed.
- Don't spend much time creating beautiful UI, just make it look consistent.
Please submit written answers to these questions:
- How could you modify the project setup to improve type safety, code reuse, testability, and general code quality?
- What technical challenges do you see for the same project at scale? How would you address them? Assume there are tens of thousands of users in tens of different fellowships.
- What product/UI challenges do you see for the same project at scale? How would you address them?
- Use a separate repo for the solution. Don't fork it, use this guide for mirroring repos.
- Create a short Loom recording of UI and code walk-through.
- Write the answers to the questions in a Notion or any other kind of shared doc.
- Send everything above via an email to your contact at On Deck.
Tech stack:
- Next.js,
- TypeScript,
- Sqlite3,
- Apollo server,
- Apollo client,
- React.
Folder structure:
components/
— reusable React components;pages/
— the usual Next.js page structure;graphql/
— GraphQL server, schema, resolvers, DB connection;scripts/
— contains the SQL script used for creating and populating the tables indb.sqlite
.
The database is already included in the repo (db.sqlite
) and populated (scripts/populate.sql
). Its basic structure:
users
— people participating in fellowships;projects
— projects that founders are working on (connected tousers
throughuser_projects
);announcements
— announcements by On Deck Team targeting specific fellowships or global (fellowship = "all"
).