diff --git "a/pages/nucleus/transcript/\133code\135/human.js" "b/pages/nucleus/transcript/\133code\135/human.js"
new file mode 100644
index 0000000..d84a78f
--- /dev/null
+++ "b/pages/nucleus/transcript/\133code\135/human.js"
@@ -0,0 +1,31 @@
+import Axios from 'axios';
+
+const t = () => { return <></>}
+export default t
+export async function getServerSideProps(ctx) {
+    if(!ctx.params.code) {
+        return {
+            redirect: {
+                destination: '/nucleus/transcript/about',
+                permanent: true
+            }
+        }
+    }
+    let code;
+    try {
+        code = (await Axios.get(`http://localhost:10000/transcript/${ctx.params.code}`))
+    } catch (e) {
+        return {
+            redirect: {
+                destination: '/nucleus/transcript/invalid',
+                permanent: true
+            }
+        }
+    }
+    return {
+        redirect: {
+            destination: `http://api.coded.codes/nucleus/transcript/${ctx.params.code}/human`,
+            permanent: true
+        }
+    }
+}
\ No newline at end of file
diff --git "a/pages/nucleus/transcript/\133code\135/index.js" "b/pages/nucleus/transcript/\133code\135/index.js"
new file mode 100644
index 0000000..4b2389f
--- /dev/null
+++ "b/pages/nucleus/transcript/\133code\135/index.js"
@@ -0,0 +1,61 @@
+import Axios from 'axios';
+import React from 'react';
+import Message from '../../../../Components/Transcripts/Message';
+
+function Index(props) {
+    return <div style={{overflowY: "scroll", overflowX: "hidden"}}>
+        <div style={{
+            width: "100vw",
+            height: "40px",
+            backgroundColor: "#F27878",
+            display: "flex",
+            justifyContent: "left",
+            alignItems: "center",
+            paddingLeft: "25px",
+            color: "white",
+            fontSize: "1.5em",
+        }}>Transcript for: {props.data.for.username}#{props.data.for.discriminator} | In {<a href={`https://discord.com/channels/${props.data.guild}/${props.data.channel}`}>ChannelName</a>} | Type: {props.data.type}</div>
+        <div style={{
+            width: "100vw",
+            backgroundColor: "var(--theme-ui-colors-background)", //Can we change this to be not black please. it's too contrast heavy
+            margintop: "-50px",
+            padding: "25px",
+            paddingTop: "10px",
+            transition: "all 0.3s ease-in-out"
+        }}>
+        {
+            props.data.messages.map((message, index) => {
+                return <Message key={index.toString()} message={message} />
+            })
+        }
+        </div>
+    </div>
+}
+
+export default Index;
+export async function getServerSideProps(ctx) {
+    if(!ctx.params.code) {
+        return {
+            redirect: {
+                destination: '/nucleus/transcript/about',
+                permanent: true
+            }
+        }
+    }
+    let code;
+    try {
+        code = (await Axios.get(`http://localhost:10000/transcript/${ctx.params.code}`))
+    } catch (e) {
+        return {
+            redirect: {
+                destination: '/nucleus/transcript/invalid',
+                permanent: true
+            }
+        }
+    }
+    return {
+        props: {
+            data: code.data
+        }
+    }
+}
\ No newline at end of file
diff --git "a/pages/nucleus/transcript/\133code\135/raw.js" "b/pages/nucleus/transcript/\133code\135/raw.js"
new file mode 100644
index 0000000..8c5436e
--- /dev/null
+++ "b/pages/nucleus/transcript/\133code\135/raw.js"
@@ -0,0 +1,32 @@
+import Axios from 'axios';
+
+const t = () => { return <></>}
+export default t
+export async function getServerSideProps(ctx) {
+    console.log(ctx.req.url)
+    if(!ctx.params.code) {
+        return {
+            redirect: {
+                destination: '/nucleus/transcript/about',
+                permanent: true
+            }
+        }
+    }
+    let code;
+    try {
+        code = (await Axios.get(`http://localhost:10000/transcript/${ctx.params.code}`))
+    } catch (e) {
+        return {
+            redirect: {
+                destination: '/nucleus/transcript/invalid',
+                permanent: true
+            }
+        }
+    }
+    return {
+        redirect: {
+            destination: `http://localhost:10000/transcript/${ctx.params.code}`,
+            permanent: true
+        }
+    }
+}
\ No newline at end of file
