API and business logic for Timora, a student-friendly calendar and planning tool with Google Calendar integration.
- Runtime: Bun
- Framework: Express.js
- Database ORM: Prisma
- Database: PostgreSQL
- Authentication: JWT, Passport.js with Google OAuth 2.0
- Validation: Zod
- Language: TypeScript
git clone https://github.com/Ismael-Loko/timora-backend.git
cd timora-backendInstall the dependencies using Bun:
bun installbun run devThe server will start on the port specified in your .env file (default is 8001).
To run this project, you will need to add the following environment variables to your .env file:
PORT: The port the server will run on.NODE_ENV: The environment (e.g., development, production).
DATABASE_URL: The connection string for the database.PGADMIN_DB_URL: The connection string for pgAdmin.
JWT_SECRET: The secret key for signing JWTs.JWT_EXPIRES_IN: The expiration time for JWTs.JWT_REFRESH_EXPIRES_IN: The expiration time for refresh tokens.JWT_REFRESH_SECRET: The secret key for signing refresh tokens.
GOOGLE_CLIENT_ID: The client ID for Google OAuth.GOOGLE_CLIENT_SECRET: The client secret for Google OAuth.GOOGLE_REDIRECT_URI: The redirect URI for Google OAuth.
DEV_FRONTEND_URL: The URL of the frontend in development.PROD_FRONTEND_ORIGIN: The origin of the frontend in production.
EMAIL_SERVICE_API_KEY: The API key for the email service.EMAIL_FROM: The email address to send emails from.EMAIL_HOST: The host of the email service.EMAIL_PORT: The port of the email service.EMAIL_USER: The username for the email service.EMAIL_PASS: The password for the email service.EMAIL_SECURE: Whether to use a secure connection for the email service.EMAIL_RESET_PASSWORD_URL: The URL for resetting passwords.
.
├── prisma/
│ └── schema.prisma
├── src/
│ ├── config/
│ ├── controllers/
│ ├── middlewares/
│ ├── models/
│ ├── routes/
│ ├── services/
│ ├── utils/
│ └── server.ts
├── .env
├── .gitignore
├── bun.lockb
├── package.json
├── README.md
└── tsconfig.json