Skip to content

AyushMukkanwar/Postinator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Postinator - Social Media Automation Tool

Build Status License: MIT PRs Welcome

Uploader is a powerful, full-stack monorepo application designed to automate and schedule posts to your social media accounts. Built with a modern tech stack including Next.js, Nest.js, and Prisma, it provides a seamless experience for managing your social media presence.


✨ Features

  • Multi-Platform Support: Easily connect and manage multiple social media accounts (starting with Twitter).
  • schedule Post Scheduling: Create and schedule posts for any time in the future.
  • 🕒 Asynchronous Publishing: A robust background worker handles the posting process reliably.
  • 🔐 Secure Authentication: User authentication is handled securely via Supabase.
  • 🗂️ Post History: View a complete history of all published content.
  • 🌓 Light & Dark Mode: A sleek, modern UI with theme support.

🛠️ Tech Stack

This project is a monorepo managed with pnpm and Turborepo.

Area Technology
Frontend Next.js, React, TypeScript, Tailwind CSS
Backend API Nest.js, TypeScript
Worker Nest.js (for background jobs)
Database Prisma (ORM), PostgreSQL
Auth Supabase
Caching/Queue Redis
Tooling Turborepo, Docker, ESLint, Prettier

🏗️ Project Structure

The monorepo is organized into apps and packages.

/
├── apps/
│   ├── api/          # Nest.js backend API (with its own Prisma schema)
│   ├── web/          # Next.js frontend
│   └── post-worker/  # Nest.js worker (with its own Prisma schema)
│
└── packages/
    ├── eslint-config/      # Shared ESLint configuration
    └── typescript-config/  # Shared TypeScript configuration

🚀 Getting Started

Follow these instructions to set up and run the project on your local machine.

Prerequisites

Make sure you have the following installed:

1. Clone the Repository

git clone https://github.com/your-repo/your-project.git
cd your-project

2. Install Dependencies

pnpm install

3. Set Up Environment Variables

This project requires environment variables for the API, the worker, and the frontend. You will find .env.sample files in apps/api and apps/post-worker.

  1. Create a Supabase Project: Go to Supabase and create a new project to get your API URL and keys.
  2. Copy Sample Files:
    cp apps/api/.env.sample apps/api/.env
    cp apps/post-worker/.env.sample apps/post-worker/.env
  3. Fill in the Variables: Open the new .env files and add your credentials. The most important ones are:
    • DATABASE_URL: Your PostgreSQL connection string (you can get this from Supabase or a local Postgres instance).
    • SUPABASE_URL: Your Supabase project URL.
    • SUPABASE_ANON_KEY: Your Supabase project anon key.
    • REDIS_HOST, REDIS_PORT, REDIS_PASSWORD: Connection details for Redis.

4. Set Up the Database

Run the Prisma migrations to set up your database schema. This command needs to be run for both the api and post-worker apps.

pnpm --filter api prisma migrate dev
pnpm --filter post-worker prisma migrate dev

5. Run the Application

You can run the entire stack (database, Redis, and all apps) using Docker Compose, or run the services manually.

Option 1: Local Development (Recommended)

  1. Start Background Services (Redis):

    docker-compose -f docker-compose.redis.yml up -d

    (Ensure your DATABASE_URL points to your Supabase instance or another running Postgres database).

  2. Start All Applications: This command uses Turborepo to run the dev script in all apps/* simultaneously.

    pnpm dev
  3. Access the Apps:

Option 2: Full Dockerized Development

The docker-compose.dev.yml is configured to build and run the entire stack in containers.

  1. Build and Start All Services:
    docker-compose -f docker-compose.dev.yml up --build

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

📄 License

This project is MIT licensed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published