Quizlet clone (server side)
Many use Quizlet not just to memorize terms but also to learn by heart an entire question bank (multiple choices question type). This project add one feature that Quizlet not currently have: the creator can add multiple options for each of their terms for learner to choose in learning mode.
- I use GraphQL.
- I use Prisma as an ORM due to its easy-to-use API and its ability to work seamlessly with Typescript.
- For the client side, I use Next.js with Apollo.
- For the server side, I use Nest.js.
- I use GraphQL because it is easy to build-and-use API with the support of Prisma.
- I didn't use a state management library like Redux or MobX because I already use Apollo complete with its own cache system.
- I use Material UI instead of custom module CSS because I don't have time to build the feel and look of each individual component.
- I didn't build this application with Docker or Kubernetes in mind or use microservices architecture because hosting a Kubernetes app will cost money.
- Set up CI/CD integration
- Write some integration and system testing
- Add support for Docker and Kubernetes
$ npm install
First, you must create an .env.local
file that house 7 environment variables DATABASE_URL
, SHADOW_DATABASE_URL
, PUBLIC_KEY
, PRIVATE_KEY
, FRONTEND_SERVER_URL
, BACKEND_DOMAIN
and PORT
.
You can check out this website to generate a public and private key pair.
It's something like this:
DATABASE_URL =
SHADOW_DATABASE_URL =
PUBLIC_KEY =
PRIVATE_KEY =
FRONTEND_SERVER_URL = http://localhost:3000
BACKEND_DOMAIN = localhost
PORT = 4000
Now, you can run the development server:
# development mode
$ npm run start:dev
npm run build
# then
npm run start