Instaclone is an Instagram clone written using the MERN stack + TypeScript.
This is a final project after having completed Full Stack Open.
- The frontend uses RTK Query. The api slice
handles data-fetching and caching. Here's an example of data-fetching logic using RTK Query in my
useAuth.ts
hook. - Mantine is used for styling.
- React Testing Library with MSW for unit and integration tests. Here's an example of a test I wrote to ensure that my HTTP interceptor for refreshing an expired access token is working.
- Cypress for e2e tests. Here's an example!
- Uses a in-memory MongoDB server for testing and some development. Check it out! However, I'm using a Docker Mongo container for the majority of the development of this app. Here's the docker-compose file.
- I seperate the Mongo querying/business logic from the Express routing logic. Each model has it's own service (User service example) and router (User router example).
- Uses JWT and bycrypt for authentication and implements a refresh token/access token flow. Here's the router handling authentication and the
authenticator
custom middleware used for protecting certain routes. - Uses Cloudinary for image uploading. Here's the
cloudinary.ts
file I've written to work with the Cloudinary Upload API. - Integration tests using Jest and supertest. Example.
- Uses Socket.IO for live notifications. Check out the
SocketManager
class which handles Socket.IO connections