Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,25 @@ staticfiles/
# Frontend generated files
node_modules/
dist/
dist-ssr/
coverage/
.output/
.data/
.nuxt/
.nitro/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
logs
*.local
*.tsbuildinfo
.eslintcache
__screenshots__/
*.timestamp-*-*.mjs
/cypress/videos/
/cypress/screenshots/

# Docs generated files
docs/site/
Expand All @@ -54,10 +70,12 @@ infra/env/.env.stg
apps/backend/env/.env.pro
apps/backend/env/.env.stg

apps/frontend/.env
apps/frontend/.env.*
apps/frontend/.env.local
apps/frontend/.env.*.local
!apps/frontend/.env.example

# Observability runtime data
observability/grafana/data/
observability/loki/data/
o11y/grafana/data/
o11y/loki/data/
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,33 @@ Observability: **Grafana + Loki + Alloy**
Proxy: **Treafik**
Deployment: **Docker**

[![My Skills](https://skillicons.dev/icons?i=py,django,html,css,tailwind,ts,js,vue,postgres,redis,grafana,docker)](https://skillicons.dev)

## Project Structure
`app/`: Web Applications
- **Django** backend
- **Vue** frontend

`infra/`: Infrastructure
- docker compose files
- environment files

`o11y/`: Observability
- **grafana** config files
- **loki** config files
- **alloy** config files

`docs/`: Developer Documentation
- **mkdocs**

`.github/`: GitHub Configs
- **GitHub** Workflows

`Makefile`: Command Shortcuts

## Developer Documentation

Documents for our developers: [alien-commons-docs](https://lazyalienserver.github.io/alien-commons-docs/)
> [!Important]
> This documentation is not yet up-to-date.

Developer Documentation: [AlienCommons Docs](https://lazyalienserver.github.io/alien-commons/)
7 changes: 7 additions & 0 deletions apps/backend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ __pycache__/
*.pid
*.sock
*.sqlite3
.coverage
htmlcov/
.pytest_cache/
.mypy_cache/
.ruff_cache/
.cache/
.idea/
media/
staticfiles/
.venv/
Expand Down
20 changes: 14 additions & 6 deletions apps/frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
node_modules/
dist/
node_modules
.nuxt
.output
dist

.git
.idea
.vscode
.DS_Store

*.log
coverage

.env
.env.*
!.env.staging
!.env.production
*.log
.DS_Store
!.env.example
1 change: 0 additions & 1 deletion apps/frontend/.env

This file was deleted.

1 change: 0 additions & 1 deletion apps/frontend/.env.development

This file was deleted.

1 change: 0 additions & 1 deletion apps/frontend/.env.production

This file was deleted.

1 change: 0 additions & 1 deletion apps/frontend/.env.staging

This file was deleted.

4 changes: 2 additions & 2 deletions apps/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ FROM node:23 AS build-stage
ENV NODE_OPTIONS="--max-old-space-size=512"

COPY package*.json ./
RUN npm install
RUN pnpm install

COPY . .

ARG VITE_MODE=production
RUN npm run build -- --mode ${VITE_MODE}
RUN pnpm run build -- --mode ${VITE_MODE}

FROM nginx:1.27.4-alpine AS production-stage

Expand Down
31 changes: 31 additions & 0 deletions apps/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Nuxt Minimal Starter

## Setup

Make sure to install dependencies:

```bash
pnpm install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
pnpm dev
```

## Production

Build the application for production:

```bash
pnpm build
```

Locally preview production build:

```bash
pnpm preview
```
5 changes: 5 additions & 0 deletions apps/frontend/app/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Custom tailwind themes, utilities, components, variants and base styles */
@import 'tailwindcss';
@import '@tailwindcss';

@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* Custom editor styles */
@import 'tailwindcss';
@import 'katex/dist/katex.min.css';
@import '@tailwindcss';

@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));

Expand Down
1 change: 1 addition & 0 deletions apps/frontend/app/assets/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "tailwindcss";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'tailwindcss';
@import '@tailwindcss';

@layer components {
.modal {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
<script setup>
import {ref, computed, onMounted, onBeforeUnmount} from "vue";
import { RouterLink, useRouter } from "vue-router";
import { useUserStore, useThemeStore } from "@/features/user/stores";
import { useUserStore, useThemeStore } from "~/features/users/stores";
import {
YouTubeBlackIcon,
GithubIcon,
SunIcon,
GearIcon,
PersonIcon,
PersonIconFillLarge,
RepoIcon,
RocketIcon,
SignInIcon,
SignOutIcon,
XIcon,
PlusIcon,
TriangleDownIcon,
} from "@/assets/icons";
import { WebsiteIcon, LasLogo } from "@/assets";
YouTubeBlackIcon, GithubIcon, SunIcon, GearIcon,
PersonIcon, PersonIconFillLarge, RepoIcon, RocketIcon,
SignInIcon, SignOutIcon, XIcon, PlusIcon, TriangleDownIcon,
} from "~/assets/icons";
import { WebsiteIcon, LasLogo } from "@/core/assets";
import { createSourceArticle } from '@/features/articles/api';
import { useToast } from "vue-toastification";
import { useRoute } from "vue-router";
Expand Down Expand Up @@ -211,7 +201,7 @@ onBeforeUnmount(() => {
:class="isSidebarOpen ? 'translate-x-0' : 'translate-x-full'"
>

<!-- If user has signed in -->
<!-- If users has signed in -->
<div v-if="userInfo">
<div class="absolute top-0 right-0 mt-8 mr-9 p-1 rounded-md hover:cursor-pointer hover:bg-gray-200 dark:hover:bg-[#2C2C2C]" @click="toggleSidebar">
<XIcon class="sidebar-icon"/>
Expand Down Expand Up @@ -259,7 +249,7 @@ onBeforeUnmount(() => {
</div>
</div>

<!-- If user has not signed in -->
<!-- If users has not signed in -->
<div v-else>
<div class="flex flex-col gap-5 p-6">
<div class="flex flex-row items-center gap-2">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script setup>
<script setup lang="ts">
import { watch, onMounted, onBeforeUnmount } from 'vue'

const props = defineProps({
Expand Down Expand Up @@ -72,4 +72,8 @@ onBeforeUnmount(() => {
</div>
</div>
</Teleport>
</template>
</template>

<style scoped>

</style>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup>
<script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue'
import { getChannelSnapshot } from "@/api";
import { extractErrorMessage } from "@/utils";
import { WebsiteIcon } from "@/assets"
import { getChannelSnapshot } from "@/core/api";
import { extractErrorMessage } from "@/core/utils";
import { WebsiteIcon } from "~/assets/logos"

const snapshot = ref({})
let intervalId = null
Expand Down Expand Up @@ -69,4 +69,4 @@ onUnmounted(() => {

<WebsiteIcon class="w-70 h-70 fill-current"/>
</div>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useUserStore } from "@/features/user/stores/useUserStore";
import { getRefreshToken } from '@/utils'
import { useUserStore } from "~/features/users/stores/useUserStore";
import { getRefreshToken } from '@/core/utils'

const api = axios.create({
baseURL: `${import.meta.env.VITE_API_BASE_URL}/api/v1`,
Expand Down Expand Up @@ -93,7 +93,7 @@ api.interceptors.response.use(
);


// for requests outside the user system
// for requests outside the users system
const apiBare = axios.create({
baseURL: `${import.meta.env.VITE_API_BASE_URL}/api/v1`,
timeout: 10000,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { api } from '@/api'
import { api } from '@/core/api'


function getMySourceArticles(query = undefined) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { api, apiBare } from '@/api'
import { api, apiBare } from '@/core/api'

function createProfile(email, password, confirmPassword) {
return apiBare.post('/profiles/', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup>
<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { useUserStore } from '@/features/user/stores';
import { useToast } from "vue-toastification";
import { MailIcon, KeyIcon } from "@/assets/icons"
import { MailIcon, KeyIcon } from "@/core/assets/icons"

const toast = useToast();
const router = useRouter();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script setup>
<script setup lang="ts">
import { computed } from "vue";
import { useUserStore } from "@/features/user/stores";
import { handleLogout } from "@/features/user/utils";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script setup>
<script setup lang="ts">
import { useUserStore } from "@/features/user/stores";
import { RouterLink } from "vue-router";
import { computed } from 'vue'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup>
<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { createProfile } from '@/features/user/api'
import { useToast } from "vue-toastification";
import { MailIcon, KeyIcon } from "@/assets/icons"
import { MailIcon, KeyIcon } from "@/core/assets/icons"

const router = useRouter();
const toast = useToast();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
<script setup lang="ts">
import { useUserStore } from "@/features/user/stores";
import { PaintBrushIcon } from "@/assets/icons"
import { PaintBrushIcon } from "@/core/assets/icons"
import { computed } from "vue";
import { RouterLink } from "vue-router";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script setup>
<script setup lang="ts">
import { useThemeStore } from "@/features/user/stores";

const themeStore = useThemeStore();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup>
<script setup lang="ts">
import { ref, computed } from "vue";
import { useUserStore } from "@/features/user/stores";
import { updateAvatar, updateUsername } from "@/features/user/api";
import { useToast } from "vue-toastification";
import { PencilIcon, PersonIcon, MailIcon, RocketIcon } from "@/assets/icons"
import { PencilIcon, PersonIcon, MailIcon, RocketIcon } from "@/core/assets/icons"

const toast = useToast();
const userStore = useUserStore();
Expand Down
Loading
Loading