Welcome
Codeloft is a multi-vendor marketplace for source code. Developers open an author account, upload scripts, themes, plugins, templates, apps and games, and buyers pay and download at once. You, the owner, review every upload, set the commission and run payouts from one admin panel. Everything is written for you to read and change: plain Laravel, plain CSS, plain JavaScript, no build step.
Features
Storefront
- Home page with Featured, Popular, Flash Sale, Free Files, New Releases, blog and offer banner. Each block can be switched off and renamed.
- Shop with category, price, rating and tag filters, search and sorting.
- Product page with gallery, live preview link, reviews, Q&A, change log, support tab, Regular and Extended license choice.
- Automatic badges: Popular, Bestseller, Hot, New, Flash Sale and Free, driven by sales and age. Limits are editable.
- Wishlist with price-drop e-mails, follow authors, coupons, referral links.
- Optional e-mail confirmation for new members.
Marketplace
- Author accounts with upload form (files included, version, framework, database, CSS/JS framework, language), earnings, withdrawals.
- Author levels 1 to 8 by sales value and achievement badges.
- Commission per item, per author or one site default. Optional buyer fee, fixed or percent.
- A personal license key for every purchase.
- New versions: authors upload an update, you review it, buyers are e-mailed and can still download older versions.
- Payout statements as PDF for every payment you send to an author.
- Refund requests: the buyer asks, the author gives an opinion, you decide, everybody is e-mailed.
Payments
- Card (Stripe), PayPal, Razorpay (UPI, cards, wallets), PayHere (Sri Lanka), crypto through NOWPayments, and manual bank or wallet transfer that you approve.
- Webhooks fail closed: nothing is delivered unless the signature, amount, currency and order all match.
Admin
- Dashboard, orders, items with review queue and file inspector, members, withdrawals, coupons, categories, administrators.
- Pages, blog, FAQ, messages, newsletter subscribers.
- Settings for logo, favicon, colours, home page texts, fees, badges, payments, social login, SEO, ads, e-mail and maintenance mode.
- Item files can live on this server, in an S3 compatible bucket (Amazon S3, Wasabi, Cloudflare R2, Backblaze B2, DigitalOcean Spaces, MinIO) or on another server over FTP or SFTP.
- Two-step sign in for administrators with any authenticator app and recovery codes.
- Installer in the browser and a read-only demo mode.
Server requirements
| PHP | 8.3 or newer |
| Extensions | pdo (pdo_mysql or pdo_sqlite), mbstring, openssl, tokenizer, xml, ctype, json, fileinfo, zip, gd, curl |
| Database | MySQL 5.7 or 8, MariaDB 10.4 or newer, or SQLite 3 |
| Web server | Apache with mod_rewrite (included .htaccess files) or Nginx (snippet below) |
| HTTPS | Required for live payments |
| Brand name | Settings → General → Site name changes the name in titles, e-mails, receipts, footer and logo text. |
| Cloud storage | Optional. Needs an account at the storage provider, or an FTP/SFTP server. |
| Not needed | Composer, Node.js, SSH. The vendor folder is included. |
|---|
The installer checks all of this for you before it lets you continue.
Package contents
product/ | The script. Upload this folder's content. |
documentation/ | This guide. |
START-HERE.txt | The short version. |
|---|
Inside product/: app (PHP code), resources/views (all pages, plain Blade), public (the only folder visitors can reach, with CSS, JS, fonts and images), routes, config, database (migrations and demo seeders), tests.
Install
- Create a database. In cPanel open MySQL Databases, create a database and a user, and give the user all privileges. Write down the name, user and password. (Skip this for SQLite.)
- Upload. Unzip the package and upload everything inside
product/ to your domain's folder. Best: point the domain at the public folder. If your host cannot do that, keep everything in the main folder; the included .htaccess forwards visitors to public and hides private folders.
- Open your domain. You land on the installer. Every line in the server check must be green. If a folder is red, set its permission to 775 in the file manager.
- Fill in the form: site name and address, database details, your administrator account and the admin panel address. Pick a word other than
admin so bots cannot guess it. Tick the sample-data box only if you want a demo shop.
- Press Install now. The tables are created and you are sent to the admin login.
After installing, the installer closes itself (it shows a 404). To run it again, delete storage/app/installed.lock and .env and start from an empty database.
Storage and uploads
Run php artisan storage:link if your host lets you (the installer tries it). Author zip files live in storage/app/private, which is never reachable from the web; buyers download through a signed, logged-in route.
File storage
The zip files authors upload are the most valuable files on your site and can get large. Settings → Storage decides where they live. Pictures always stay on your server.
| This server | The default. Files are kept in storage/app/private, which visitors can never reach. |
| S3 compatible bucket | Amazon S3, Wasabi, Cloudflare R2, Backblaze B2, DigitalOcean Spaces, MinIO and others. Enter the endpoint (leave empty for Amazon S3), region, bucket, an optional folder and the access key pair. Create the key with permission for that one bucket only. Keep the bucket private. |
| FTP or SFTP | Another server you control. Enter host, port, user and password (SFTP can use a private key instead) and a folder that already exists. Prefer SFTP, or FTP with the encrypted (FTPS) switch on. |
|---|
Provider hints
| Wasabi | Endpoint https://s3.wasabisys.com (or the one for your region), region such as us-east-1. |
| Cloudflare R2 | Endpoint https://ACCOUNT.r2.cloudflarestorage.com, region auto. |
| Backblaze B2 | Endpoint https://s3.REGION.backblazeb2.com, region as shown for the bucket. |
| MinIO | Your MinIO address, and switch on Use path style addresses. |
|---|
- Save the settings, then press Test the saved storage. It writes, reads and deletes a tiny file and tells you what went wrong, if anything.
- Press Copy existing files to it to move the files that were uploaded before. Until you copy them, they keep working from this server, and nothing breaks if you switch back.
Downloads are streamed through your site, so only a signed-in buyer with a paid order can download, and the bucket never needs to be public. Secret keys are stored encrypted and never shown again.
Cron job
The shop works without one, but one line makes things automatic: the daily check for wishlist price drops (flash sales start and end by themselves), scheduled and large promotion e-mails, the weekly digest and the demo reset on a public demo. Add this in your hosting panel's cron section, once per minute:
* * * * * php /path/to/your-site/artisan schedule:run >> /dev/null 2>&1
Nginx and sub-folders
server {
server_name example.com;
root /var/www/codeloft/public;
index index.php;
client_max_body_size 128M;
location / { try_files $uri $uri/ /index.php?$query_string; }
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
location ~ ^/uploads/.*\.(php|phtml|phar)$ { deny all; }
location ~ /\.(?!well-known) { deny all; }
}
Raise upload_max_filesize and post_max_size in php.ini to at least the biggest zip your authors will upload.
Admin panel
Sign in at yourdomain.com/<admin address>/login. The sidebar groups everything: Sales (orders, withdrawals, coupons), Catalog (items, categories), Content (pages, blog, FAQ), People (members, messages, subscribers) and System (settings, administrators).
The admin works on phones too: the menu slides in from the left and tables become cards.
Administrators
Under Administrators you can add helpers. A super administrator can do everything; a manager can do everything except add or remove administrator accounts. Forgot the password? Run php artisan codeloft:admin you@example.com in a terminal to create a new super administrator.
Two-step sign in
Every administrator can protect their own account: My account in the admin sidebar → Set it up.
- Install an authenticator app on your phone (Google Authenticator, Microsoft Authenticator, Authy, 1Password and many others).
- Add an account and choose enter a setup key. On a phone you can also tap the link on the page. Type the key shown.
- Enter the 6 digit code the app shows. Two-step sign in is now on, and 8 recovery codes are shown once. Save them in a password manager; each works one time.
From then on, the password alone does not sign anybody in: the second step asks for the code (or a recovery code). Codes work only once, and repeated wrong codes pause the account like wrong passwords do. If a colleague loses their phone, a main administrator can press Reset next to their name under Administrators, and they can set it up again.
Logo and colours
Settings → Logo & footer: upload your logo (a transparent PNG about 400 px wide), an optional white logo for dark backgrounds and a favicon. Pictures are re-drawn and resized on the server. Here you also write the tagline, copyright line, the e-mail that receives contact messages and your social links; icons only appear for links you fill in.
Settings → Colors: pick a preset or any color. Buttons, links, gradients and badges follow it everywhere. Settings → Home page edits the headline, the search text, the offer banner and every section's title; each section has an on/off switch.
Fees and commission
| Platform commission | The share you keep from each sale. The default is 30 %, so the author gets 70 %. |
| Author or item override | Open a member or an item and set its own percent. The order is: item, then author, then site default. |
| Buyer fee | Fixed (for example $5 on top of a $30 item) or percent. It is added at checkout and belongs to the platform. |
| Referral share | Paid out of the platform share when a buyer came through a member's link (?ref=username). |
| Hold period | Earnings are released after this many days, so refunds can still be handled. |
| Smallest withdrawal | Authors cannot request less. |
|---|
Payout statements
When you mark a withdrawal as paid, the author can open a payout statement (a one page PDF with a number such as PS-000012) from their Withdrawals page, and you can open it under Withdrawals → Paid. Write your business name, address and tax number in Settings → General → Company details on payout statements and they are printed on it. It is a record of payment, not a tax invoice.
A coupon discount is paid by the platform; the author's earning is calculated on the price before the discount.
Payment gateways
Open Settings → Payments, switch a method on and paste its keys. Secret keys are stored encrypted and are never shown again. Use test keys first, then live keys. The shop currency (Settings → General) must be supported by every gateway you switch on.
Stripe (cards)
Dashboard → Developers → API keys: copy the publishable and secret keys. Add a webhook endpoint https://yourdomain.com/webhooks/stripe for the event checkout.session.completed and paste its signing secret.
PayPal
Create a REST app at developer.paypal.com, copy Client ID and Secret, choose Sandbox or Live. The order is captured on return and checked against your price on the server.
Razorpay (UPI and cards)
Copy the Key ID and Key secret. Add the webhook https://yourdomain.com/webhooks/razorpay for payment.captured and paste its secret.
PayHere (Sri Lanka)
Enter the Merchant ID and Merchant secret and set the notify URL to https://yourdomain.com/webhooks/payhere. Use Sandbox mode for tests. PayHere accounts are tied to the registered domain.
Crypto (NOWPayments)
Paste the API key and the IPN secret; set the IPN callback to https://yourdomain.com/webhooks/nowpayments.
Bank or wallet transfer
Write your account or wallet details. The buyer sends the money, enters the reference, and the order waits under Orders → Waiting for review. Check your bank, then press Approve; the files and license keys are released at that moment. Every reference can be used once.
How payments are protected
- Prices come from the database. The cart stores only item ids and license types; the browser can never send a price.
- Webhooks fail closed. Stripe and Razorpay use signature checks, PayHere uses its signed hash, NOWPayments uses an HMAC. A missing secret, a bad signature, a wrong amount or a wrong currency all end in an error and no delivery.
- One order, one payment. The gateway transaction id is unique, orders complete inside a locked database transaction, and repeating a webhook changes nothing.
- Server-side confirmation. Returning from a gateway page proves nothing; the server asks the gateway or waits for the signed webhook.
- Manual payments are approved by a person and each bank reference is accepted once.
- Keys are encrypted in the database and the admin pages never print them.
- Downloads need a paid order. Files are streamed from a private folder to the signed-in buyer who owns the order.
The behavior is covered by automated tests in tests/Feature/PaymentSecurityTest.php. Run them with php artisan test on a development copy.
Reviewing author uploads
New items wait under Items → Pending. Open one and press Open the files. You see the whole zip as a folder tree, read any text file in the browser (matches are highlighted), view pictures, and download the zip.
An automatic check runs when the author uploads. It looks for documentation, unsafe paths, leftover folders, executables, .env files, nested archives and zip bombs, and scans the code for encoded or obfuscated code, license locks, shell commands, hard-coded secrets and calls to other servers. It is a helper for your own judgment, not a replacement: always open a few files yourself. Press Check again after a re-upload. Approve, or reject with a note that the author sees.
Versions and updates
When an author uploads a new zip for an item that is already on sale, buyers keep getting the current files. The new version waits under that item's Versions card, marked Waiting for review. You can open its files, read the code, see the automatic check and download the zip, exactly like a new item. Then:
- Approve publishes it: it becomes the live version, the change log on the item page gets the author's notes, the author is told, and every buyer who holds a license is e-mailed (unless they switched update e-mails off).
- Reject with a note: the author is told what to fix, buyers keep the current version.
The previous version stays in the history. Buyers can download older versions from their Downloads page, which helps when an update breaks a site. Authors see the full history, and any rejection note, when they edit their item. Items that are still in review (or were rejected) are simply replaced, because nobody has bought them yet.
E-mails to members
| Confirm your e-mail | Settings → System → Members must confirm their e-mail address. New members get a link that works for 48 hours; until they use it, they can browse but cannot buy, download, sell, review or comment. You can confirm a member by hand on their page. Social sign in and password reset links count as confirmation. Switch this on only after the test e-mail under Settings → Email arrives, otherwise nobody can confirm. |
| New version | Sent to buyers when you approve an update. Every member can switch it off under Account → Settings. |
| Price drops | Every wishlist remembers the price the member last saw. When the item gets cheaper (the author lowers the price, or a flash sale starts), the member gets one e-mail. A second e-mail follows only after another drop. Members can switch it off under Account → Settings. A daily job (see Cron job) catches flash sales that start and end on their own. |
| Sign in protection | After repeated failed sign ins the owner gets an e-mail with a link to choose a new password. |
|---|
Refund requests
A buyer who is not happy opens the order in their account and presses Request a refund next to the item. They choose a reason and describe the problem. They can ask within the number of days you set in Settings → Fees & commission → Refund requests (14 by default), once per item, and never for free items.
- The author is told. An e-mail goes to the author, and the request appears under Seller → Refund requests with a counter. The author chooses I agree or I do not agree. A reason is required when they decline. The buyer is e-mailed the answer.
- You are told. The request shows under Refunds in the admin menu (with a counter) the moment it is sent, and the address in Settings → Logo & footer → Email for contact form messages gets an e-mail when a request arrives and when the author answers. The tabs are Needs your decision (the author answered), Waiting for the author and Decided. You can decide without waiting for the author.
- You decide. Approve closes the license of that item, reverses the author's earning for it and takes one off the sales counter; the order becomes Refunded when all its items are. Then return the money in your payment provider; the page shows the amount (item plus its buyer fee). Reject needs a reason, and that reason is e-mailed to the buyer and to the author automatically.
Everybody gets an e-mail at every step, and the buyer can follow the request, with the author's and your notes, under Account → Refunds. A buyer can withdraw a request until it is decided. Edit the Refund Policy page so it matches your own days and rules.
License keys
Every purchased item gets its own key, for example CL-7K2M-Q9XA-3PLD-HW4C, tied to the buyer, the item and the license type (Regular or Extended). Buyers see it on the Downloads page and on the receipt. Authors can type a key into Seller → License check to see who bought their item and which license applies.
Buyers and authors can read a public explanation on the License Guide page (/page/license-guide, linked from every product's license window and from the footer). It is a normal page, so you can edit it under Pages.
The key is proof of purchase only. Codeloft does not lock the products and does not contact any remote server; that is what keeps the items portable and in line with marketplace rules.
Authors, levels and badges
Any member can become an author from the Sell menu (the dashboard offers a one-click opt-in). Levels 1 to 8 follow total sales value; edit the steps in Settings → Badges & levels. Item badges also come from there: how many sales make an item Popular or Bestseller and how many days it counts as New. Flash sales are set per item with a price and an end time; the badge and countdown appear and disappear by themselves.
Profiles and payout details
| Every member | Account → Settings: profile picture, name, country and a short "about you" (up to 400 characters). Pictures are re-drawn and cropped on the server, so only genuine images are kept. |
| Authors | Also a wide profile banner (at least 1000 x 250 pixels), a website and links to Facebook, X, Instagram, YouTube, LinkedIn and GitHub. Every link must start with https:// and point to the right site, and is shown with nofollow. |
| Payout details | Seller → Withdrawals → Payout details: PayPal e-mail, bank account and USDT address, saved once. They are stored encrypted, shown only to their owner, and never on the public page. A withdrawal request is filled in from them automatically; the author can still type other details for one request. You see the details on each withdrawal request. |
| What is public | Author level and badges, sales and review counts, items, links and the about text. What an author has earned in money is never shown publicly; only the author sees those amounts on their own page and dashboard. |
| Moderation | Open a member under Members to read their links or remove an unsuitable picture or banner with one click. |
|---|
Author applications
With Settings → Authors → Approve new authors switched on, members who want to sell fill in the form on the Become an Author page (about them, a portfolio link, what they plan to sell). It appears under Author applications in the admin menu with a counter. Approve it and the member becomes an author at once; reject it and write the reason. Either way they get an e-mail, and a rejected member can apply again after improving the application.
Messages between members
Buyers can write to an author from the author's profile or an item page, and authors answer from Messages in the account menu. Conversations are threads with an unread counter and an e-mail alert (at most one per thread until it is read). Every message has a Report link; reports appear under Message reports in the admin menu, where you can read that thread, dismiss the report or ban the member. Members can block each other from the thread page.
Pages, blog and FAQ
Pages holds About, Terms, Privacy, Refund and Delivery policies, the License Guide and the Become an Author page. Edit the text, switch a page off, or add new ones; choose the footer column. Page text goes through a safety filter that removes scripts. The default texts are generic starting points: read and adapt them to your business and country before you go live.
Blog posts get a cover picture (resized for you) and appear on the home page and in the sitemap. FAQ entries appear on the FAQ page. Messages are the contact form entries; Subscribers lists the newsletter e-mails and exports them as CSV.
E-mail (SMTP)
Settings → Email. Fill in host, port, encryption, user and password from your mail provider, and a from-address on your own domain. Mail is sent for receipts, password resets and the contact form.
| Provider | Host | Port / encryption |
| Your hosting mailbox | mail.yourdomain.com | 587 TLS or 465 SSL |
| Brevo | smtp-relay.brevo.com | 587 TLS |
| Mailgun | smtp.mailgun.org | 587 TLS |
| Amazon SES | email-smtp.<region>.amazonaws.com | 587 TLS |
Google and Facebook login
Settings → Social login shows the redirect address to copy into each developer console, for example https://yourdomain.com/auth/google/callback. Paste the client id and secret and switch the provider on; the buttons appear on the sign-in and sign-up pages. An existing account is linked only when the provider confirms the e-mail address, so nobody can take over an account by guessing an e-mail.
SEO, analytics and ads
Settings → SEO & ads: default title and description, Google Search Console verification code, Google Analytics 4 id, and AdSense publisher id with a slot for the shop and the item pages. /sitemap.xml, /robots.txt and /ads.txt are generated for you. Submit the sitemap in Search Console. Ids are checked before they are printed on the page.
Security
- Debug is off after install (
APP_DEBUG=false). Keep it off.
- Admin address is yours to choose.
- Sign in is limited to 10 requests per minute per visitor address. Every failed attempt on an account makes the next one wait longer (1, 2, 4, 8 seconds), and the fifth failure in a row pauses that account for 15 minutes. Members then receive an e-mail with a link to choose a new password, which also lifts the pause. The visitor always sees the same "details do not match" message, so nobody can tell a lockout from a typing mistake. The same rules protect the admin sign in.
- Passwords are stored with bcrypt (cost 12), upgraded automatically at the next sign in if the cost is raised, and never written to logs; sessions are regenerated at sign-in; forms carry CSRF tokens.
- Uploaded pictures are re-encoded; the uploads folder refuses to run PHP.
- HTML written by authors and admins is filtered through an allow-list.
- Responses carry nosniff, frame, referrer and permissions headers, plus HSTS on HTTPS.
- Back up the database and the
storage/app/private folder regularly (or let your storage provider keep versions of the bucket).
- New versions of items are reviewed before buyers can download them.
Public demo mode
To show your shop to the public without risk, install it on a sub-domain and add DEMO_MODE=true to .env. The admin panel can then be browsed but nothing can be changed. php artisan codeloft:demo-reset restores the sample data and creates the viewing account again. Its address and password come from DEMO_ADMIN_EMAIL and DEMO_ADMIN_PASSWORD in .env (for example demo@demo.com and demo123456), so you can publish them as the demo login. On a demo site the admin sign-in page and the member sign-in page also show one-click buttons (/admin/demo-login, /demo-login/author, /demo-login/buyer), so reviewers and visitors get in without typing anything; these addresses answer 404 when DEMO_MODE is off. Authors and buyers in the sample data use the password Demo-pass-2026 on a demo site (for example codeloom@demo.example.com); with the usual cron line * * * * * php /path/to/artisan schedule:run it runs every three hours by itself. Use gateway test keys on a demo.
Sample accounts and clearing the sample data. A normal install gives the sample authors and buyers random passwords. Under Sample data in the admin menu, Set the sample password gives them Demo-pass-2026 (for example codeloom@demo.example.com), which is what a reviewer or a demo visitor needs. Delete the sample data removes all sample accounts with their items, orders and messages for good, so the shop is empty before you sell real items. The main administrator can also use Delete for good on any item or member page.
Updating
- Back up the database and files.
- Upload the new files over the old ones; keep
.env, storage and public/uploads.
- Run
php artisan migrate --force (terminal), or ask your host to. - Clear the cache with
php artisan optimize:clear.
Troubleshooting
| Blank page or error 500 | Check that storage and bootstrap/cache are writable, then read storage/logs/laravel.log. |
| The installer shows a red line | Follow the hint under it; hosts list extensions in their PHP selector. |
| 404 on every page except the home page | mod_rewrite or the Nginx try_files rule is missing. |
| Pictures are missing | Run php artisan storage:link and check the site address in .env (APP_URL). |
| Zip upload fails | Raise upload_max_filesize and post_max_size. |
| A payment stays pending | The gateway could not reach /webhooks/.... Check the webhook URL, the secret and that HTTPS has a valid certificate. |
| I forgot the admin address | It is ADMIN_PATH in .env. |
Credits
| Laravel, PHP libraries | MIT |
|---|
| Laravel Socialite | MIT |
| Bootstrap Icons | MIT |
|---|
| Plus Jakarta Sans, Inter, Caveat | SIL Open Font License, hosted on your own server |
| Demo photographs | Unsplash licence, listed in public/assets/img/p/CREDITS.txt. They are for the sample data only; replace them with your own. |
|---|
Google and Facebook login
Settings → Social login shows the redirect address to copy into each developer console, for example
https://yourdomain.com/auth/google/callback. Paste the client id and secret and switch the provider on; the buttons appear on the sign-in and sign-up pages. An existing account is linked only when the provider confirms the e-mail address, so nobody can take over an account by guessing an e-mail.