Skip to content

vsmxd/dare2do

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dare2Do

A web platform where users can create charity-based dares, pledge money, and make a difference. Users create dares with monetary pledges, others can vote and comment, and money goes to charity based on dare completion.

Features

  • User authentication with Firebase
  • Create and manage dares with charity integration
  • Secure payment processing with Stripe
  • Voting and commenting system
  • Image generation for dares
  • Admin dashboard for platform management
  • Real-time notifications
  • Responsive design
  • Multi-tier payment flow (platform fees, Stripe fees, charity amounts)

Tech Stack

Frontend

  • React 18 with TypeScript
  • Tailwind CSS for styling
  • Firebase Auth for authentication
  • React Router v6 for routing
  • Formik & Yup for form validation
  • React Hot Toast for notifications
  • Stripe Elements for payments
  • Axios for API calls

Backend

  • Node.js with Express
  • TypeScript for type safety
  • MongoDB with Mongoose
  • Firebase Admin SDK
  • Stripe API integration
  • Node-cron for scheduled tasks
  • Winston for logging
  • Express-validator for input validation

Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • MongoDB database
  • Firebase account
  • Stripe account

Installation

  1. Clone the repository:
git clone <repository-url>
cd dare2do
  1. Install dependencies:
# Install frontend dependencies
cd frontend
npm install

# Install backend dependencies
cd ../backend
npm install
  1. Set up environment variables:

Create a .env file in the frontend directory with the following variables:

REACT_APP_API_URL=http://localhost:3001/api
REACT_APP_FIREBASE_API_KEY=your_firebase_api_key
REACT_APP_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
REACT_APP_FIREBASE_PROJECT_ID=your_firebase_project_id
REACT_APP_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
REACT_APP_FIREBASE_APP_ID=your_firebase_app_id
REACT_APP_STRIPE_PUBLIC_KEY=your_stripe_public_key

Create a .env file in the backend directory with the following variables:

PORT=3001
MONGODB_URI=your_mongodb_uri
FIREBASE_PROJECT_ID=your_firebase_project_id
FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
FIREBASE_PRIVATE_KEY=your_firebase_private_key
FIREBASE_CLIENT_EMAIL=your_firebase_client_email
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
NODE_ENV=development
PLATFORM_FEE_PERCENTAGE=0.10
PLATFORM_FEE_FIXED=0.35
  1. Start the development servers:
# Start the backend server
cd backend
npm run dev

# Start the frontend development server
cd frontend
npm start

The application will be available at http://localhost:3000.

Project Structure

dare2do/
├── frontend/
│   ├── public/
│   └── src/
│       ├── components/
│       │   └── ui/
│       ├── contexts/
│       ├── pages/
│       ├── services/
│       ├── types/
│       └── config/
└── backend/
    ├── src/
    │   ├── controllers/
    │   ├── middleware/
    │   ├── models/
    │   ├── routes/
    │   ├── services/
    │   ├── config/
    └── uploads/

Available Scripts

In the frontend directory:

  • npm start: Start the development server
  • npm build: Build the production version
  • npm test: Run tests
  • npm run lint: Run ESLint
  • npm run format: Format code with Prettier

In the backend directory:

  • npm run dev: Start the development server
  • npm start: Start the production server
  • npm test: Run tests
  • npm run lint: Run ESLint

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

API Documentation

  • Authentication endpoints /api/auth/*
  • Dare management /api/dares/*
  • Payment processing /api/payments/*
  • User management /api/users/*
  • Admin controls /api/admin/*
  • Charity management /api/charities/*

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages