Skip to content
trojan-pkPublic

About

Peerly: a free, open-source peer study-help platform. Students find a classmate who can explain a topic, request short sessions, share resources and earn reviews. Next.js, TypeScript, MongoDB.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Peerly

Stuck on a topic? Find a classmate who can explain it.

Peerly is a free, open-source study-help platform where university students ask each other for short sessions, share useful resources, and build a reputation for helping. One account can both learn and help.

License: MIT Next.js 16 TypeScript PRs welcome


What is Peerly?

Every course has someone who already understood the topic you are stuck on. Peerly helps you find that person, ask for a short session, and say thanks properly with a rating that helps the next student.

  • Learners describe what they are stuck on, pick a helper, and get contact details only after the helper accepts.
  • Helpers list the topics and courses they can teach, choose who to help, and earn real reviews and response badges.
  • Everyone can share and upvote study resources.

Peerly is deliberately small: no payments, no AI-generated answers, no file uploads and no hosted video service. It connects people and gets out of the way.

What you can do

Find the right helper

  • Search by topic, subject, course code (for example CS101), mode (online or in person) and whether the helper charges.
  • See an explainable match score, real review averages and a fast-reply badge.
  • Browse public helper profiles and, if a helper opts in, a shareable page at /h/<name>.

Ask for help, fast

  • Send a request marked Normal or Urgent, with an optional "needed by" deadline. Urgent requests show first to helpers, with a live countdown.
  • If a helper does not answer in time the request expires and you can try another helper in one click.
  • Get a notification bell, plus optional email alerts.

Plan the session

  • Suggest up to three times; the other person picks one.
  • Download a calendar file (.ics) for the agreed time.
  • Online sessions get a one-click video link (Jitsi Meet).
  • Both people confirm completion, then the learner leaves one review.

Share what helped

  • Add links to useful resources, tagged by topic and course.
  • Mark resources as helpful and sort the library by Most helpful.

Stay in control of your data

  • Contact details are never public; they unlock only for the learner after the helper accepts.
  • Download my data (JSON) and Delete account are built in.
  • Report anything inappropriate; admins can hide and restore content.

Built for speed

  • Press Ctrl K (or ⌘K) for a command palette to jump to pages, peers, topics and your own requests. Press ? for keyboard shortcuts.
  • Light, dark or system theme, designed to meet WCAG AA contrast.
  • Mobile-friendly with a bottom navigation bar.

How it works

  1. Sign in with Google.
  2. Set up your profile: your university, courses and topics you can help with.
  3. Find a helper or send a request describing what you are stuck on.
  4. The helper accepts, and your contact details unlock for the session.
  5. Agree a time, meet online or on campus, and mark the session complete.
  6. Leave a review so other students know who explains things well.

Run it yourself

Peerly is a Next.js application that you host yourself. There is no hosted version yet.

You need

  • Node.js 22.18+ and pnpm 11 (corepack enable sets up the right pnpm)
  • A MongoDB database (Atlas free tier or a local mongodb://127.0.0.1:27017/peerly)
  • A Google OAuth client for sign-in (free)

Quick start

git clone https://github.com/trojan-pk/peerly.git
cd peerly
pnpm install --frozen-lockfile
pnpm setup:env          # creates .env.local with a random AUTH_SECRET
# Add MONGODB_URI, AUTH_GOOGLE_ID and AUTH_GOOGLE_SECRET to .env.local
pnpm check:env --connect
pnpm dev

Open http://localhost:3000.

Without credentials the app still builds and shows safe "unavailable" states; sign-in and saved data need real configuration. Step-by-step instructions for MongoDB Atlas and Google sign-in are in docs/configuration.md.

Configuration at a glance

Variable Required What it is
MONGODB_URI Yes Database connection string (include the /peerly database name)
AUTH_GOOGLE_ID Yes Google OAuth client ID
AUTH_GOOGLE_SECRET Yes Google OAuth client secret
AUTH_SECRET Yes Session encryption key (generated by pnpm setup:env)
AUTH_URL Yes Your app's base URL, http://localhost:3000 locally
ADMIN_EMAILS No Comma-separated admin Google emails (moderation, university catalogue)
RESEND_API_KEY, EMAIL_FROM No Enables email alerts and university-email verification

Never commit .env or .env.local. The .env.example file lists every variable with comments.

Deploy

Peerly needs a Node.js server runtime (not a static export):

pnpm build
pnpm start

Follow the deployment checklist before inviting real users.

First-time admin setup

Sign in with an account listed in ADMIN_EMAILS, open /admin/universities and add your university with its student email domains. Members can then pick their university and courses in Settings.

Tech stack

Area Tools
Framework Next.js 16 (App Router), React 19, TypeScript
Data MongoDB with Mongoose
Auth Auth.js (NextAuth v5) with Google
UI Tailwind CSS 4, Motion, Lucide icons, self-hosted fonts
Quality Vitest, Playwright, ESLint, GitHub Actions
Tooling pnpm

Useful commands

Command What it does
pnpm dev Start the dev server
pnpm build / pnpm start Production build and server
pnpm lint ESLint
pnpm typecheck TypeScript check
pnpm test Unit and integration tests (Vitest)
pnpm test:e2e Browser tests (Playwright)
pnpm check Typecheck, test and build
pnpm check:env Validate your environment variables

Project layout

src/app/          Routes, pages and API handlers (Next.js App Router)
src/components/   UI components and the shared design system
src/lib/          Server logic: matching, expiry, notifications, validation
src/models/       Mongoose models
src/tests/        Unit and integration tests
e2e/              Playwright browser tests
scripts/          Setup and verification scripts
public/brand/     Logo and brand assets

Documentation

Project status

Peerly is early-stage software. The core flows are implemented and tested automatically, but the full Google consent flow, real email delivery and a live production deployment have not yet been verified end to end. Read known limitations before relying on it for real users, and set up backups, because free database tiers do not include them.

Contributing

Contributions are welcome, from typo fixes to new features. Please read CONTRIBUTING.md for setup, workflow and the pull request checklist, and follow our Code of Conduct. Nobody pushes directly to main; every change goes through a pull request.

Security

Found a vulnerability? Please report it privately as described in SECURITY.md instead of opening a public issue.

License

Released under the MIT License. Copyright (c) 2026 Abdul Rahman.

About

Peerly: a free, open-source peer study-help platform. Students find a classmate who can explain a topic, request short sessions, share resources and earn reviews. Next.js, TypeScript, MongoDB.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages