Skip to content

Latest commit

Β 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Tenthis

A lightweight PHP-based task and reward platform where users can complete tasks, earn rewards, manage their wallet, use referrals, and request withdrawals.

PHP MySQL License


πŸ“Œ About

Tenthis is a lightweight task-and-reward web application built with PHP and MySQL.

The project provides the basic building blocks for a rewards platform, including user authentication, referral tracking, task management, wallet functionality, withdrawals, and shortlink integrations.

It is designed primarily as a learning project and a foundation that can be extended with additional task providers, APIs, payment systems, fraud detection, and analytics.


✨ Features

πŸ‘€ User System

  • User registration
  • Login and logout
  • User profiles
  • Password management
  • Session-based authentication

🎯 Task System

  • Browse available tasks
  • View task details
  • Complete tasks and receive rewards
  • Task history
  • Admin task management

πŸ’° Wallet & Rewards

  • User wallet
  • Reward tracking
  • Wallet balance management
  • Withdrawal requests
  • Withdrawal history

🀝 Referral System

  • Referral links
  • Referral tracking
  • Referral validation
  • Referral-based rewards

πŸ”— API Integration

The project includes lightweight endpoints inside APIS/ for integrating external shortlink/task systems.

These endpoints can be extended to support:

  • Task synchronization
  • Task verification
  • Completion callbacks
  • Reward processing
  • External API integrations

Important: External providers may have their own API, traffic, incentivization, and payout requirements. Review their terms before integrating them into a production deployment.

πŸ› οΈ Admin Panel

The admin area provides functionality for managing:

  • Users
  • Tasks
  • Withdrawals
  • Rewards
  • Platform activity

πŸ“Έ Screenshots

Index Login Page

Left: INDEX PAGE | Right: LOGIN PAGE


🧰 Tech Stack

Technology Purpose
PHP Backend application
MySQL / MariaDB Database
HTML / CSS Frontend
JavaScript Client-side interactions
Apache Local/production web server
XAMPP / WAMP Local development

πŸ“ Project Structure

tenthis/
β”‚
β”œβ”€β”€ gfkjkjer/
β”‚   └── admin/              # Admin panel
β”‚
β”œβ”€β”€ img/                    # Images and assets
β”‚
β”œβ”€β”€ php/                    # Shared PHP files
β”‚   β”œβ”€β”€ connection.php      # Database connection
β”‚   β”œβ”€β”€ function.php        # Shared functions
β”‚   └── ...
β”‚
β”œβ”€β”€ APIS/             # API integrations
β”‚
β”œβ”€β”€ .htaccess               # Apache configuration
β”œβ”€β”€ index.php               # Homepage
β”œβ”€β”€ login.php               # Login
β”œβ”€β”€ signup.php              # Registration
β”œβ”€β”€ logout.php              # Logout
β”œβ”€β”€ profile.php             # User profile
β”œβ”€β”€ refer.php               # Referral system
β”œβ”€β”€ task_offer.php          # Task listing
β”œβ”€β”€ view_task.php           # Task details
β”œβ”€β”€ students_offer.php      # Student offers
β”œβ”€β”€ short.php               # Shortlink functionality
β”œβ”€β”€ long.php                # Long-link handling
β”œβ”€β”€ withdraw.php             # Withdrawal requests
β”œβ”€β”€ withdraw_history.php    # Withdrawal history
β”œβ”€β”€ update_wallet.php       # Wallet updates
β”œβ”€β”€ verify.php              # Verification
β”œβ”€β”€ contact.php             # Contact page
β”œβ”€β”€ feedback.php            # Feedback
β”œβ”€β”€ history.php             # User history
β”œβ”€β”€ script.js               # JavaScript
β”œβ”€β”€ style_.css              # Base styles
β”œβ”€β”€ style_light.css         # Light theme
β”œβ”€β”€ style_dark.css          # Dark theme
β”œβ”€β”€ userform.sql            # Database schema
└── README.md

βš™οΈ Requirements

Before installing Tenthis, make sure you have:

  • PHP 7.4 or newer
  • MySQL or MariaDB
  • Apache or another PHP-compatible web server
  • XAMPP, WAMP, Laragon, or equivalent local environment
  • A web browser

For production, use a currently supported PHP version rather than an outdated PHP release.


πŸš€ Installation

1. Clone the repository

git clone https://github.com/epic-piyush/tenthis.git
cd tenthis

Or download the repository as a ZIP and extract it into your web server's document root.


2. Start your local server

For XAMPP:

  1. Start Apache
  2. Start MySQL
  3. Make sure PHP is working correctly

Place the project inside:

xampp/htdocs/

For example:

xampp/htdocs/tenthis/

3. Create the database

Open phpMyAdmin and create a database.

For example:

tenthis

Then import:

userform.sql

You can also import it from the MySQL command line:

mysql -u root -p tenthis < userform.sql

4. Configure the database

Open:

php/connection.php

and configure your database credentials.

Example:

$host = "localhost";
$username = "root";
$password = "";
$database = "tenthis";

If you use the API integration, check:

APIS/connection.php

and configure it as required.

Never commit production database passwords, API keys, or other secrets to GitHub.


5. Open the application

For XAMPP, open:

http://localhost/tenthis/

You should now see the Tenthis homepage.


πŸ” Security

Tenthis is currently a lightweight project and should be reviewed and hardened before being exposed to the public internet.

Important areas to review include:

  • Prepared SQL statements
  • Input validation
  • Output escaping
  • Password hashing
  • Session security
  • CSRF protection
  • Authentication and authorization
  • Admin access control
  • Rate limiting
  • Wallet/reward transaction integrity
  • Withdrawal validation
  • API authentication
  • Webhook/postback verification
  • Secret/API-key management

Never store passwords as plain text

Use PHP's password hashing functions:

password_hash($password, PASSWORD_DEFAULT);

and verify them with:

password_verify($password, $hash);

Protect secrets

Do not commit files containing:

Database passwords
API keys
API secrets
Private tokens
Production credentials

Use environment variables or another secure secret-management approach for production.


πŸ’³ Reward & Wallet Integrity

Because Tenthis handles user rewards and wallet balances, reward operations should be treated as financially sensitive operations.

A production implementation should ensure that:

Task completion
      ↓
Server-side verification
      ↓
Transaction validation
      ↓
Reward credited
      ↓
Ledger entry created

The browser should never be trusted to directly award itself money or rewards.

For external task/shortlink integrations, use provider-supported server-side verification or signed callbacks where available.


πŸ”— API Integrations

The APIS/ directory is intended as an integration layer for external services.

A recommended production flow is:

User
 β”‚
 β–Ό
Tenthis
 β”‚
 β”‚ Start task
 β–Ό
External provider
 β”‚
 β”‚ User completes task
 β–Ό
Provider verification
 β”‚
 β”‚ Server-to-server callback
 β–Ό
Tenthis API
 β”‚
 β”‚ Verify request
 β–Ό
Task marked completed
 β”‚
 β–Ό
Reward credited

API integrations currently is as the tenthis website is running in another tab it validates user by the stored cookies, you can make it as your own comfort

Avoid trusting client-side parameters such as:

?completed=true

as proof of task completion.


πŸ§ͺ Development

For local debugging, PHP errors can be enabled temporarily:

ini_set('display_errors', 1);
error_reporting(E_ALL);

Do not leave detailed error output enabled on a production server.


🀝 Contributing

Contributions are welcome.

1. Fork the repository

git clone https://github.com/epic-piyush/tenthis.git

2. Create a branch

git checkout -b feature/my-feature

3. Make your changes

Keep changes focused and document any configuration or database changes.

4. Commit your changes

git add .
git commit -m "Add my feature"

5. Push your branch

git push origin feature/my-feature

Then open a Pull Request.


πŸ› Issues

If you find a bug or have a feature request, open an issue in the repository.

When reporting a bug, include:

  • PHP version
  • MySQL/MariaDB version
  • Operating system
  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Relevant error messages

Please do not post passwords, API keys, database credentials, or other secrets in issues.


πŸ“œ License

This project is licensed under the MIT License.

See LICENSE for details.


πŸ‘¨β€πŸ’» Author

Piyush

GitHub: @epic-piyush

Repository: epic-piyush/tenthis


⭐ Support the Project

If you find Tenthis useful or interesting:

  • ⭐ Star the repository
  • πŸ› Report bugs
  • πŸ’‘ Suggest improvements
  • πŸ”§ Submit pull requests
  • πŸ“š Use it as a learning project

Tenthis is a learning-focused project and should be security-audited and properly configured before being used for real-money production workloads.

About

Task completion and verification, withdraw section, refer and refer validation, simple login/signup website...

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages