Build a Discord Clone in Swift with AI
By the Vibecode teamUpdated 5 min read
Short answer
A Discord clone is group chat organized as servers and channels, with roles, reactions, a member list, direct messages and voice rooms. The screens are well understood; the work is real-time delivery and moderation. Vibecode's template, Concord, has the iPhone layout (server rail, collapsible channel categories, chat with replies, embeds and reactions, members, a voice room and DMs) as a native app written in Swift, on sample conversations. Remix it and add real-time messaging by chatting.
See it running

Template
ConcordiOS
Discord clone Β· Swift and SwiftUI
Server rail, channel categories, chat with reactions and embeds, member roles, voice room and DMs.
Remix copies the working Swift app into your Vibecode account for free. Or open a new iOS app with the prompt below to build a fresh copy.
Open the template pageThe prompt we used
This is the prompt that built Concord in Vibecode. Paste it into a new iOS app project to build your own copy from scratch, or change the details first.
Prompt Β· 782 words
Build a polished, fully working native iOS app in SwiftUI named Concord: an original community chat app that recreates the core experience of Discord, but with its own name, its own original logo and its own color palette. Do NOT use the Discord name, logo, wordmark, app icon or any trademarked asset anywhere in the app. Design an original Concord logo mark, drawn with SwiftUI shapes (Path/Canvas) or made as a generated image asset, and use it in the header.
Screens and flows (dark slate theme with your own accent, e.g. teal #14B8A6, not blurple; bottom bar: Servers, Messages, Notifications, You):
1. Servers home (the mobile layout): a left server rail with round server icons (original art or emoji + gradients), a selected-server pill indicator on the left edge, unread dots and mention badges, a Messages button on top, and "+" add server / explore at the bottom. To the right, the selected server's panel: banner, server name with boost level, "Invite" and search, and channel categories that collapse/expand: TEXT CHANNELS (# welcome, # announcements, # general, # show-your-app, # help, # memes), VOICE CHANNELS (π Lounge with 3 people inside shown under it, π Coworking). Unread channels are white and bold. 5 servers, each with its own channels and messages ("Indie Builders", "Pixel Art Club", "Lo-fi Lounge", "Gym Rats", "Design Crit").
2. Channel chat: tapping a channel slides the chat panel in over the server list (swipe right or tap back to reveal the list again). Header "# general" with topic, threads, members icons. Messages are grouped by author with avatar, name in a role color, timestamp, replies with a quoted line, @mentions highlighted, a code block, a link embed card with an image, an image attachment, and reaction chips (tap to toggle your reaction and count; long-press a message opens an action sheet with an emoji row, Reply, Copy Text, Pin, Mark Unread). Composer: "+" button, "Message #general" input, emoji and send; sending adds your message with an animation, then "Kai is typing..." and a reply after about 2 s. At least 40 fixture messages across channels.
3. Members: the members icon (or swipe left in the chat) shows the member list grouped by role ("Mods β 2", "Online β 12", "Offline β 30") with status dots and activities ("Playing Pixel Quest"); tapping a member opens a profile sheet with banner, avatar, about me, roles and "Message".
4. Voice channel: tapping π Lounge opens a voice room: participant tiles with avatars and an animated green ring for whoever is "speaking" (rotate the speaker every couple of seconds), names, mute icons, and controls (camera off, mute toggle, deafen toggle, speaker, red leave). Leaving returns to the server with you removed from the channel's list.
5. Messages: DM list with online status and last message; open a DM and chat like a channel. Notifications: mentions and replies list. You: banner and avatar with a status picker (Online, Idle, Do Not Disturb, Invisible), username, "Set a custom status", and settings rows.
Rules for the whole app:
- Native SwiftUI for iOS 26, the deployment target the Vibecode iOS template already uses (do not change it). iPhone-first layout. SF Symbols are fine for UI icons (never for the Discord logo or any brand mark).
- Everything runs on-device from realistic, deterministic fixture data in one Swift file (e.g. Fixtures.swift: real-sounding names, handles, numbers, timestamps, captions). No backend (leave the backend/ folder alone and make no network calls except loading images and media), no login, no permissions (no camera, photos, location, contacts, notifications, microphone). Do not persist state (no UserDefaults, @AppStorage, SwiftData or files): every launch starts from the same fixture state, so the demo is repeatable.
- Remote images: load images.unsplash.com photo URLs (with ?w=800&q=80 style params) with AsyncImage (or a small cached image view) and a tasteful placeholder. Verify every image and media URL with `curl -s -o /dev/null -w "%{http_code}" <url>` before you use it and replace any that do not return 200. No broken or blank images anywhere.
- Polish: native-feeling spacing and typography, safe areas, smooth spring animations (.spring/.snappy, most under 350 ms), matchedGeometryEffect for hero and expand/collapse transitions where it helps, .sensoryFeedback haptics on key taps, pressed states, and loading/empty states. Simulated waits stay short (under 3 s). Every button visible on screen does something sensible; nothing is a dead end.
- Keep the compiler happy: small files (under ~300 lines each), big view bodies split into subviews, and no long chained expressions, so nothing hits "unable to type-check this expression in reasonable time".
- It must build with zero errors and run in the iOS simulator with no crash. Walk through every flow above and fix anything broken.Discord clone features
What Concord includes today, and what you add next. Everything in the template runs on sample data, with no login and no backend, so it works the moment you open it.
In the template
Server rail
Round server icons with a selected pill, unread dots, mention badges and add or explore buttons.
Channels
Server banner, collapsible text and voice categories, bold unread channels and who is in voice.
Channel chat
Messages grouped by author with role colors, replies, mentions, code blocks, link embeds and images.
Reactions and actions
Tap reaction chips to toggle; long-press for reply, copy, pin and mark unread.
Live replies
Sending shows a typing indicator and a reply, so the chat feels live.
Member list
Members grouped by role and online status with activities and a profile sheet.
Voice room
Participant tiles with a speaking ring, mute, deafen, camera and leave controls.
DMs, notifications and status
Direct messages, a mentions and replies feed, and a status picker.
Add with a prompt
Real-time messaging
Messages delivered to everyone in a channel the moment they are sent.
Real voice and video
Audio and video calls between members.
Roles and moderation
Permissions per role, bans, timeouts and message deletion.
How to build a Discord clone with Vibecode
- 1
Remix the template
Open the Concord share page and press Remix. Vibecode copies the whole Swift project into your account, so you start from a working app instead of an empty screen. Remixing is free.
- 2
Make it yours by chatting
Tell the agent what to change in plain English, for example: βRename the app to Study Hall, make one server per class, and add a #homework channel where messages can be marked as answered.β Each change rebuilds the app and runs it in Vibecode's cloud iOS simulator, right in your browser.
- 3
Publish to the App Store
Click Publish, choose Publish to App Store and sign in with your Apple ID. Vibecode builds, signs and uploads the app to Apple, with no Mac and no Xcode. You need an Apple Developer account ($99/year) and the Plus plan or higher.
The hard parts of a real Discord clone
Screens are the quick part. These are what take the time once real people use it.
Real-time delivery
Every open client keeps a connection (usually a WebSocket) and subscribes to the channels it can see. The server fans each new message out to those connections and the app inserts it without a refresh. Plan for reconnects: on resume, fetch everything after the last message id you have.
Unread state at scale
Unread dots and mention badges need a last-read message id per person per channel. Update it when a channel is opened, and compute mentions on the server when a message is written, not when each client loads.
Voice is a separate system
Voice channels run on WebRTC with a media server that mixes or forwards audio between participants. That is a different stack from chat; hosted real-time audio services are the practical route for a small team.
Permissions and moderation
Roles decide who can read, post, pin and delete in each channel, and every API call has to check them on the server. Communities also need reporting and blocking, which Apple's Guideline 1.2 requires for apps with user posts.
Take it from template to real app
Each step is one message to the Vibecode agent. Send them one at a time and test in between.
- 1
Accounts and servers
Vibecode Cloud adds sign-in and a database for servers, channels and members.
Prompt
Add Vibecode Cloud. Let people sign up, create a server with channels, invite others with a link, and join servers.
- 2
Real-time messages
Store messages and push new ones to everyone in the channel without a refresh.
Prompt
Save messages in the database and deliver new messages, reactions and typing indicators to everyone in the channel in real time.
- 3
Roles and moderation
Owners and mods need tools before strangers join.
Prompt
Add roles with permissions per channel, let mods delete messages and ban members, and add report and block on every message.
- 4
Push and perks
Push notifications for mentions and DMs; RevenueCat for a paid tier.
Prompt
Send push notifications for mentions and DMs, and add a RevenueCat subscription that unlocks custom profile banners and bigger uploads.
What a Discord clone costs
Discord clone scripts and open-source repos are mostly web apps you deploy and run, including the real-time server. The Vibecode template is a native Swift community app you own and reshape by chatting; you add real-time messaging and voice when your community needs them.
| Option | Typical cost | What you get | Still on you |
|---|---|---|---|
| Clone script | $299β$5,000 one-time license | Source code for the apps, usually with an admin panel | Servers, setup, rebranding, store accounts and future updates |
| Freelancer | Hourly or a fixed bid, set by scope | Custom code built to your spec | Writing the spec, reviewing the work, hosting and store submission |
| Development agency | Custom quote per project | Design, build, testing and launch handled for you | A budget and timeline fixed by contract; every change goes through the agency |
| VibecodeThis template | Free to remix; plans from $20 a month | A native Swift Discord-style iPhone app you change by chatting, with App Store publishing (Plus and up) and source code download (Pro and Max) | A backend for real data (one prompt with Vibecode Cloud) and an Apple Developer account ($99/year) |
Clone-script prices are the range listed by script marketplaces and vendors. Vibecode plans and what each includes are on the pricing page.
Frequently asked questions
Is it legal to build a Discord clone?
Yes. Servers, channels and voice rooms are common chat patterns. Don't use Discord's name, the Clyde logo, the blurple color or its icons, or suggest you are affiliated. The template is called Concord, with its own accent color and server art.
Can I publish a Discord clone to the App Store?
Yes, as your own community product: a course community, a club, a creator's fan app, a team space. Apple rejects plain copies (Guideline 4.1), and chat apps need content filtering, reporting, blocking and published contact details (1.2). Vibecode publishes to the App Store on the Plus plan and up, with your Apple Developer account.
Does the Discord clone work on Android?
No. Concord is a native iPhone app written in Swift, so it runs on iPhone only. For Android, start a Mobile app project in Vibecode, which builds React Native apps for iPhone and Android, and paste the prompt from this page.
Can I add a real backend to the Discord clone?
Yes. Concord runs on sample data so it works the moment you remix it. When you need real users, Vibecode Cloud adds a database, sign-in and file storage with one prompt, enough for accounts, servers, channels, roles, messages, reactions and read state. It is on the Plus plan and up. You can also connect Supabase, Firebase or your own API.
Does the template have real-time chat?
It simulates it: when you send a message, another member starts typing and replies a few seconds later, all on-device. Real delivery between people needs a backend with live connections; ask the agent to add it once Vibecode Cloud is on.
Does the voice channel work?
The voice room is an interface: participant tiles, a speaking indicator, mute, deafen and leave. Real audio needs WebRTC and a media server, which is a separate integration you can add with a hosted real-time audio service.
Is the Concord template free?
Remixing it is free with a Vibecode account and gives you your own copy of the Swift project. Changes you ask the agent for use credits. Publishing to the App Store needs a paid plan (Plus and up) and an Apple Developer account ($99/year), and downloading the source code is on the Pro and Max plans. See the pricing page for current plans.
Other guides: Uber cloneAirbnb cloneTikTok cloneYouTube cloneNetflix cloneCash App clone
Browse all app templates. Choosing a builder? Read the best AI mobile app builders guide or compare Vibecode with other app builders.











