A modern startup directory platform built with Next.js 15 and Sanity CMS, designed to showcase and discover innovative startups with cutting-edge React 19 features.
- Startup Listings: Browse and discover new startups with detailed information
- Author Profiles: Comprehensive author management system
- Content Management: Powered by Sanity CMS for easy content updates
- Rich Text Editing: Markdown editor with live preview using EasyMDE
- Visual Editing: Real-time preview with Sanity Visual Editing
- Responsive Design: Optimized for all devices with Tailwind CSS 4
- SEO Friendly: Built with Next.js 15 for optimal search engine visibility
- Error Tracking: Integrated Sentry for production monitoring
- Modern UI: Radix UI components with smooth animations
- Frontend: Next.js 15.3.5 (React 19.1.0)
- CMS: Sanity 3.22.0 with Visual Editing
- Authentication: NextAuth.js 5.0 (Beta)
- Styling: Tailwind CSS 4.1.11 with Typography plugin
- TypeScript: Full type safety with TS 5+
- Icons: Lucide React 0.525.0 + Radix Icons
- Rich Text: Portable Text, Markdown support & MD Editor
- UI Components: Radix UI primitives with CVA
- Monitoring: Sentry for error tracking
- Code Highlighting: Sanity Code Input plugin
Before you begin, ensure you have:
- Node.js 18+ installed
- npm 10.5.2+ package manager (as specified in packageManager)
- A Sanity account and project
- A Sentry account (optional, for error tracking)
- Basic knowledge of React 19 and Next.js 15
-
Clone the repository
git clone https://github.com/yourusername/your_drc.git cd your_drc
-
Install dependencies
npm install
Note: This project uses React 19 and Next.js 15 with specific version overrides defined in package.json.
-
Set up environment variables
Create a
.env.local
file in the root directory:# Sanity Configuration NEXT_PUBLIC_SANITY_PROJECT_ID=your_sanity_project_id NEXT_PUBLIC_SANITY_DATASET=production SANITY_API_TOKEN=your_sanity_api_token # NextAuth.js Configuration NEXTAUTH_SECRET=your_nextauth_secret NEXTAUTH_URL=http://localhost:3000 # Sentry Configuration (Optional) SENTRY_DSN=your_sentry_dsn SENTRY_ORG=your_sentry_org SENTRY_PROJECT=your_sentry_project # Sanity Visual Editing SANITY_REVALIDATE_SECRET=your_revalidate_secret
-
Configure Sanity
Update your
sanity.config.ts
with your project details:export default defineConfig({ projectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID!, dataset: process.env.NEXT_PUBLIC_SANITY_DATASET!, // ... other config })
-
Generate TypeScript types
npm run typegen
-
Start the development server
npm run dev
This will automatically run type generation before starting the dev server.
-
Access the application
- Frontend: http://localhost:3000
- Sanity Studio: http://localhost:3000/studio
your_drc/
βββ app/ # Next.js 15 app directory
β βββ studio/ # Sanity Studio pages
β βββ api/ # API routes
β βββ ... # Other app pages
βββ sanity/ # Sanity configuration
β βββ schemaTypes/ # Content schemas
β β βββ author.ts # Author schema
β β βββ startup.ts # Startup schema
β β βββ index.ts # Schema exports
β βββ structure.ts # Studio structure
β βββ extract.json # Generated type definitions
βββ components/ # React 19 components
β βββ ui/ # Reusable UI components
β βββ ... # Feature components
βββ lib/ # Utility functions
βββ public/ # Static assets
βββ styles/ # Global styles
βββ sanity.config.ts # Sanity configuration
βββ tailwind.config.js # Tailwind 4+ configuration
βββ next.config.js # Next.js 15 configuration
βββ sentry.client.config.js # Sentry configuration
- id: Unique identifier
- name: Author's display name
- username: Unique username
- email: Contact email
- image: Profile picture URL
- bio: Author biography (supports rich text)
- title: Startup name
- slug: URL-friendly identifier
- author: Reference to author
- views: View count
- description: Brief description
- category: Startup category
- image: Startup logo/image
- pitch: Detailed startup pitch (rich text)
- code: Code snippets (with syntax highlighting)
- Create a new schema file in
sanity/schemaTypes/
- Export it from
sanity/schemaTypes/index.ts
- Add it to the types array in the schema configuration
- Run
npm run typegen
to generate TypeScript types
The project uses the latest Tailwind CSS 4 with:
- New CSS-first configuration
- Built-in container queries
- Enhanced typography plugin
- Custom animations with tailwindcss-animate
Example component styling:
import { cn } from "@/lib/utils"
import { cva, type VariantProps } from "class-variance-authority"
const buttonVariants = cva(
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
},
},
defaultVariants: {
variant: "default",
},
}
)
Built with Radix UI primitives:
- Avatar: User profile pictures with fallbacks
- Toast: Notification system
- Icons: Comprehensive icon library
# Development
npm run dev # Start development server (with auto typegen)
npm run build # Build for production (with auto typegen)
npm run start # Start production server
npm run lint # Run ESLint
# Type Generation
npm run typegen # Generate TypeScript types from Sanity schemas
# Sanity Studio
# Access via /studio route in your app
The platform supports multiple rich text formats:
- Portable Text: Sanity's structured rich text format
- Markdown: Full markdown support with live preview using EasyMDE
- Code Blocks: Syntax highlighting for multiple languages
- Navigate to
/studio
in your browser - Click "Startup" in the content menu
- Fill in the required fields:
- Title (required)
- Category (required)
- Image URL (required)
- Author reference
- Description and pitch (supports rich text)
- Code snippets (optional)
Enable real-time preview editing:
- Set up the preview URL secret in your environment
- Use the visual editing toolbar in Sanity Studio
- See changes instantly in your Next.js app
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Configure Sentry integration (optional)
- Deploy automatically on push
Make sure to set all required environment variables:
# Required
NEXT_PUBLIC_SANITY_PROJECT_ID=
NEXT_PUBLIC_SANITY_DATASET=
NEXTAUTH_SECRET=
NEXTAUTH_URL=
# Optional but recommended
SANITY_API_TOKEN=
SENTRY_DSN=
SANITY_REVALIDATE_SECRET=
The app can be deployed to any platform that supports Node.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
- Render
This project uses the latest NextAuth.js beta with:
- Enhanced security features
- Improved TypeScript support
- Modern authentication patterns
Comprehensive error tracking and performance monitoring:
- Automatic error capture
- Performance metrics
- User session tracking
- Source map support
React 19 Compatibility
- Some packages may not yet support React 19
- Check for React 19 compatible versions
- Use the overrides in package.json when needed
TypeScript Errors with Sanity
# Regenerate types if you encounter type errors
npm run typegen
Tailwind CSS 4 Configuration
- Use the new CSS-first configuration approach
- Update class names if migrating from v3
- Check for PostCSS configuration updates
NextAuth.js Beta Issues
- Ensure you're using the latest beta version
- Check the NextAuth.js 5.0 beta documentation
- Verify your authentication configuration
Package Manager Version
- This project requires npm 10.5.2+
- Use
npm --version
to check your version - Update npm if needed:
npm install -g npm@latest
Markdown Editor Issues
- EasyMDE requires client-side rendering
- Wrap in dynamic imports for SSR compatibility
- Check for conflicting CSS styles
- Image Optimization: Use Sanity's built-in image optimization
- Code Splitting: Leverage Next.js 15's automatic code splitting
- Caching: Implement proper caching strategies
- Bundle Analysis: Use
@next/bundle-analyzer
to optimize bundle size
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Run type generation:
npm run typegen
- Test your changes:
npm run build
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow TypeScript best practices
- Use React 19 features appropriately
- Maintain compatibility with Next.js 15
- Write meaningful commit messages
- Add appropriate documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js 15 - The React framework for production
- React 19 - The latest React features
- Sanity - The composable content cloud
- Tailwind CSS 4 - A utility-first CSS framework
- NextAuth.js - Complete open source authentication solution
- Radix UI - Low-level UI primitives
- Lucide - Beautiful & consistent icon toolkit
- Sentry - Application monitoring and error tracking
- EasyMDE - A simple, beautiful, and embeddable JavaScript markdown editor
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Include error messages and environment details
- Contact the maintainers
- Initial release with Next.js 15 and React 19
- Sanity CMS integration with Visual Editing
- NextAuth.js 5.0 beta authentication
- Tailwind CSS 4 styling
- Sentry error tracking
- Rich text editing with Markdown support
Built with β€οΈ using the latest web technologies. Happy coding! π