🌐 Live Website: https://antim-seva-gilt.vercel.app/
Antim Seva — Social Impact / Full-Stack Product Project
A web-based social-impact platform concept focused on organizing and presenting Antim Seva (Antyeshti) related services and information through a structured digital experience.
A comprehensive funeral services website providing essential items and services for final rites. Built with Next.js 15 and MongoDB Atlas cloud database.
- User Authentication - Registration, login, JWT-based auth, Google OAuth
- Product Catalog - Individual products and package deals
- Shopping Cart - Add/remove items, user-specific cart management
- Bilingual Support - Hindi and English interface
- Responsive Design - Mobile-first modern UI
Frontend: Next.js 15, React 18, TypeScript, Tailwind CSS
Backend: Next.js API Routes, MongoDB Atlas
Authentication: JWT with jose library
UI Components: Radix UI, Lucide React
Prerequisites: Node.js 18+, MongoDB Atlas account, pnpm
# Clone and install
git clone https://github.com/AnuragTiwari1508/Antim-Seva.git
cd Antim-Seva
pnpm install
# Setup environment
cp .env.example .env.local
# Edit .env.local with your MongoDB URI and JWT secret
# Start development
pnpm dev- Create Account: MongoDB Atlas
- Create Cluster: Choose free tier M0
- Get Connection String: Replace in
.env.local - IP Whitelist: Add your IP or
0.0.0.0/0for development
# Test connection
node -e "
const { connectToDatabase } = require('./lib/mongodb-native.js');
async function test() {
try {
const { db } = await connectToDatabase();
console.log('✅ Database connected successfully');
} catch (error) {
console.error('❌ Database error:', error.message);
}
}
test();"# Development server
pnpm dev
# API Testing
curl -X POST http://localhost:3000/api/auth/register \
-H "Content-Type: application/json" \
-d '{"name":"Test User","email":"test@example.com","password":"password123","phone":"9876543210"}'
curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password123"}'
# Build & Production
pnpm build
pnpm start| Issue | Solution |
|---|---|
| MongoDB connection failed | Check MONGODB_URI and IP whitelist |
| Port 3000 in use | kill -9 $(lsof -ti:3000) or use different port |
| JWT token errors | Clear cookies: curl -X GET http://localhost:3000/api/auth/logout |
| Pages not loading | Clear cache: rm -rf .next && pnpm dev |
# Debug commands
DEBUG=* pnpm dev # Enable debug logging
lsof -i :3000 # Check what's using port 3000
curl -v http://localhost:3000/api/debug # Test API endpoint# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Set environment variables in Vercel dashboardJWT_SECRET=your-production-jwt-secret
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/
NEXT_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id
NEXT_PUBLIC_SITE_URL=https://your-domain.com- Set strong JWT_SECRET
- Configure MongoDB Atlas production cluster
- Set up proper IP whitelisting
- Configure Google OAuth for production domain
- Set up SSL/HTTPS
- Configure CORS if needed
// lib/mongodb-native.js customization
const client = new MongoClient(uri, {
tls: true,
maxPoolSize: 10,
serverSelectionTimeoutMS: 5000,
socketTimeoutMS: 45000,
// Add custom options here
});// Custom JWT settings in API routes
const token = jwt.sign(
{ userId: user._id.toString(), email: user.email },
JWT_SECRET,
{
expiresIn: '7d', // Customize expiration
issuer: 'antim-seva',
audience: 'antim-seva-users'
}
);# Create indexes for better performance
node -e "
const { connectToDatabase } = require('./lib/mongodb-native.js');
async function createIndexes() {
const { db } = await connectToDatabase();
await db.collection('users').createIndex({ email: 1 }, { unique: true });
await db.collection('carts').createIndex({ userId: 1 });
console.log('✅ Indexes created');
}
createIndexes();
"# Check bundle size
npx @next/bundle-analyzer
# Analyze build
pnpm build && npx next build --profile
# Memory usage
node --max-old-space-size=4096 node_modules/.bin/next devpnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm type-check- Run TypeScript checks
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Anurag Tiwari
- GitHub: @AnuragTiwari1508
- Email: tiwarianurag342407@gmail.com
- Next.js team for the amazing framework
- MongoDB for cloud database services
- Tailwind CSS for styling utilities
- Radix UI for accessible components
- Vercel for hosting platform
If you encounter any issues:
- Check the troubleshooting section above
- Search existing issues on GitHub
- Create a new issue with detailed error information
- Include your environment details (Node.js version, OS, etc.)
Happy Coding! 🚀




