Know Your Readers. Grow Your Stack.
Stackly is an intelligent CRM built specifically for Substack newsletter creators. Turn subscriber data into meaningful connections with advanced segmentation, growth analytics, and automated outreach tools.
- Advanced Segmentation - Group readers by behavior, interests, and engagement levels automatically
- Growth Analytics - Deep dive into subscriber acquisition and retention metrics in real-time
- Automated Outreach - Send personalized follow-ups and re-engagement campaigns
- Smart Automations - Connect with 1000+ tools via robust API and Zapier integration
- Revenue Tracking - Understand which content drives the most paid conversions
- Custom Personas - AI-powered reader profiles to help you write resonant content
- Node.js 18+ and npm
- PostgreSQL 16+
- Docker (optional, for local database)
-
Clone the repository
git clone https://github.com/kwstx/substack-crm-dashboard.git cd substack-crm-dashboard -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Update
.envwith your credentials:DATABASE_URL=postgresql://postgres:password@localhost:5435/substack_crm AUTH_SECRET=your-secret-key NEXTAUTH_URL=http://localhost:3000
-
Start the database (using Docker)
docker compose up -d
-
Push database schema
npm run db:push
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Authentication: NextAuth.js v5
- Database: PostgreSQL with Drizzle ORM
- Styling: Tailwind CSS
- UI Components: Radix UI + shadcn/ui
- Charts: Recharts
- Animations: Framer Motion
src/
├── app/ # Next.js app router pages
├── components/ # React components
│ ├── dashboard/ # Dashboard-specific components
│ ├── landing/ # Landing page components
│ └── ui/ # Reusable UI components
├── actions/ # Server actions
├── db/ # Database schema and migrations
└── lib/ # Utility functions
Stackly uses NextAuth.js v5 with credentials-based authentication. The auth configuration is split for Edge runtime compatibility:
src/auth.config.ts- Edge-compatible configurationsrc/auth.ts- Full auth setup with providerssrc/middleware.ts- Route protection
The application uses PostgreSQL with Drizzle ORM. Key tables include:
users- User accountssubscribers- Substack subscriberspersonas- Reader segmentscampaigns- Outreach campaignspayments- Revenue tracking
Run migrations:
npm run db:pushThe project uses a custom design system with:
- Tailwind CSS for utility-first styling
- Custom color palette (violet/purple gradients)
- Responsive design patterns
- Glassmorphism effects
- Smooth animations
npm run dev- Start development server with Turbopacknpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run db:push- Push database schema changesnpm run db:studio- Open Drizzle Studio
- Push your code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy
DATABASE_URL=your-production-database-url
AUTH_SECRET=your-production-secret
NEXTAUTH_URL=https://your-domain.comContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- Live Demo (if deployed)
- Documentation (if available)
- Support
Built with ❤️ for newsletter creators