Commit 5133b6ed authored by David Haynes's avatar David Haynes 🙆

Complete first pass on go_ahead integration

- Django + React is a go!
parent 6147ff15
Pipeline #2775 passed with stage
in 54 seconds
......@@ -17,3 +17,4 @@ __pycache__/
go/sourceme.sh
.DS_STORE
node_modules/
go/static/
# Go 3
# Go 3.0 - Go Forward 🚀
Go is at its core a URL shortening service built for the GMU community. It was
the first big SRCT project that was taken from development to production by the
founders. Originally a PHP app, it was translated into Django as a 1.0 release
and sat unmaintained for a period of time. Development on 2.0 started in 2016
with the intention of modernizing the application as well as designing for long
term maintenance. Additionally, since the core of the project is fairly simple,
2.0 functioned as a good introduction to open source development for new
members.
A project of [GMU SRCT](https://srct.gmu.edu).
## DISCLAIMER
## Architecture of the project
### `go_back`
`go_back` is the API backend of the project. It is built with the Django REST
Framework (python). It supports all CRUD (Create, Read, Update, Delete)
operations on Go links as well as RegisteredUser account management.
### `go_ahead`
## Getting started with contributing
Go 3 is a major refactor of the project with an emphasis on extensibility.
There's a workflow involved with getting started contributing but once you do
it once or twice it'll seem a lot less daunting.
Things might not work quite right.
1. Docker
Docs may not exist.
So we use docker.
I wouldn't go so far as to say we are hitting the reset button.
2. Actually coding
But it's close.
You pick an issue
```sh
pipenv install
pipenv shell
code .
docker-compose up
```
3. Deployment of changes
......@@ -3,11 +3,13 @@ version: "3"
services:
db:
image: mysql:5.7
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
command:
mysqld --character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
ports:
- "3306:3306"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: go
MYSQL_USER: go
MYSQL_PASSWORD: go
......@@ -15,7 +17,7 @@ services:
web:
build: .
ports:
- '8000:8000'
- "8000:8000"
command: ./docker-startup.sh
volumes:
- .:/go
......
from django.contrib import admin
# Register your models here.
from django.db import models
# Create your models here.
import React from "react";
import ReactDOM from "react-dom";
ReactDOM.render(
<div>
<p>Hello Go 3!</p>
</div>,
document.getElementById("root")
);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.2/css/bulma.min.css">
<title>Django DRF - React : Quickstart - Valentino G. - www.valentinog.com</title>
</head>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#006633" />
<meta name="description" content="University-branded URL shortening" />
<title>Welcome &bull; SRCT Go</title>
</head>
<body>
<section class="section">
<div class="container">
<div id="app" class="columns">
<!-- React -->
</div>
</div>
</section>
</body>
<body>
<!-- React injects itself here -->
<div id="root"></div>
</body>
<script src="static/main.js"></script>
</html>
from django.test import TestCase
# Create your tests here.
......@@ -64,6 +64,7 @@ STATIC_URL = '/static/'
STATIC_ROOT = ''
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static/'),
'./go/static/'
)
STATICFILES_FINDERS = (
......
{
"name": "go",
"version": "3.0",
"description": "University-branded URL shortening",
"main": "index.js",
"repository": "git@git.gmu.edu:srct/go.git",
"author": "Mason SRCT",
"license": "Apache-2.0",
"private": false,
"scripts": {
"dev": "webpack --mode development ./go/go_ahead/src/index.jsx --output ./go/static/main.js",
"build": "webpack --mode production ./project/frontend/src/index.js --output ./go/static/main.js"
},
"babel": {
"presets": [
"es2015",
"react"
]
},
"dependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"webpack": "^4.16.4",
"webpack-cli": "^3.1.0"
}
}
module.exports = {
module: {
rules: [{
test: /\.jsx$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
}]
}
};
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment